RQMultiButtons.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //
  2. // RQMultiButtons.h
  3. // jiaPei
  4. //
  5. // Created by 张嵘 on 2018/12/26.
  6. // Copyright © 2018 JCZ. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @protocol RQMultiButtonsDelegate;
  10. typedef NS_ENUM(NSUInteger, RQMultiButtonsType) {
  11. RQMultiButtonsType_ = 0,
  12. };
  13. @interface RQMultiButtons : UIView
  14. @property (nonatomic, assign) id<RQMultiButtonsDelegate> delegate;
  15. @property (nonatomic, strong) NSMutableArray *customButtons;
  16. // The radius from center point to each share button
  17. @property (nonatomic, assign) NSInteger radius;
  18. // Bubble button radius
  19. @property (nonatomic, assign) NSInteger bubbleRadius;
  20. // Define if bubbles are currently animating (showing or hiding)
  21. @property (nonatomic, assign) BOOL isAnimating;
  22. // Define if view will dismiss when user taps on background (Default: YES)
  23. @property (nonatomic, assign) BOOL dismissOnBackgroundTap;
  24. @property (nonatomic, weak) UIView *parentView;
  25. // The fader view alpha, by default is 0.15
  26. @property(nonatomic, assign) CGFloat faderAlpha;
  27. // The fader view background color, default is black
  28. @property (nonatomic, strong) UIColor *faderColor;
  29. - (instancetype)initWithPoint:(CGPoint)point radius:(NSInteger)radiusValue inView:(UIView *)inView;
  30. // Share bubbles will appear in UIWindow instance
  31. - (instancetype)initCenteredInWindowWithRadius:(NSInteger)radiusValue;
  32. - (void)show;
  33. - (void)hide;
  34. - (void)addCustomButtonWithIcon:(UIImage *)icon title:(NSString *)title backgroundColor:(UIColor *)color andButtonId:(NSInteger)buttonId;
  35. @end
  36. @protocol RQMultiButtonsDelegate <NSObject>
  37. @optional
  38. // On buttons pressed
  39. - (void)rqMultiButtons:(RQMultiButtons *)multiButtons tappedButtonWithType:(RQMultiButtonsType)buttonType;
  40. // On bubbles hide
  41. - (void)rqMultiButtonsDidHide:(RQMultiButtons *)multiButtons;
  42. @end