HyRoundMenuView
目录:Examples示例:How to use this project如何使用本项目?step 1 -> 初始化
_menuView = [HyRoundMenuView shareInstance];step 2 -> 填充数据源
_data = @[ [HyRoundMenuModel title:@'FaceBook' iconImage:[UIImage imageNamed:@'ICON_SNS_facebook'] transitionType:HyRoundMenuModelTransitionTypeMenuEnlarge], [HyRoundMenuModel title:@'Link' iconImage:[UIImage imageNamed:@'ICON_SNS_Link'] transitionType:HyRoundMenuModelTransitionTypeNormal], [HyRoundMenuModel title:@'微信朋友圈' iconImage:[UIImage imageNamed:@'ICON_SNS_Moment'] transitionType:HyRoundMenuModelTransitionTypeMenuEnlarge], [HyRoundMenuModel title:@'QQ' iconImage:[UIImage imageNamed:@'ICON_SNS_QQ'] transitionType:HyRoundMenuModelTransitionTypeMenuEnlarge], [HyRoundMenuModel title:@'Twitter' iconImage:[UIImage imageNamed:@'ICON_SNS_twitter'] transitionType:HyRoundMenuModelTransitionTypeMenuEnlarge], [HyRoundMenuModel title:@'微信' iconImage:[UIImage imageNamed:@'ICON_SNS_Wechat'] transitionType:HyRoundMenuModelTransitionTypeMenuEnlarge], [HyRoundMenuModel title:@'微博' iconImage:[UIImage imageNamed:@'ICON_SNS_Weibo'] transitionType:HyRoundMenuModelTransitionTypeMenuEnlarge] ].mutableCopy;step 3 -> 自定义圆点图片等等...
HyRoundMenuModel *centerModel = [HyRoundMenuModel title:@'What you want to do?' iconImage:[UIImage imageNamed:@'SendRound'] transitionType:HyRoundMenuModelTransitionTypeNormal];自定义圆点必须设置model的type属性为HyRoundMenuModelItmeTypeCenter,且只能有一个。
centerModel.type = HyRoundMenuModelItmeTypeCenter; [_data addObject:centerModel];设置好以上属性后add到数据源
最后赋值到_menuView.dataSources里
_menuView.dataSources = _data;done (更多属性设置请参考demo)
HyRoundMenuView public method and attribute descriptionHyRoundMenuView公有方法以及属性说明:允许拖拽按钮 默认为->YES
@property (nonatomic, assign) BOOL allowDrag;允许按钮吸附在屏幕边缘 默认为->YES
@property (nonatomic, assign) BOOL allowAdsorption允许拖拽按钮选择itme时产生3D效果
@property (nonatomic, assign) BOOL allowEffect3D;HyRoundMenuViewDelegate
@property (nonatomic, weak, nullable) id<HyRoundMenuViewDelegate> delegate;动画类型
@property (nonatomic, assign) HyRoundMenuViewAnimationType animationType;bigRadius/smallRadius 必须等于4
Bezier的大小必须和smallRadius*2的大小一样
建议用【PaintCode】来画想要的图形
@property (nonatomic, nullable, weak) UIBezierPath *customBigShapeBezierPath小圆按钮半径
@property (nonatomic, assign) CGFloat smallRadius大圆按钮半径
@property (nonatomic, assign) CGFloat bigRadius;形状颜色
@property (nonatomic, copy , nonnull) UIColor *shapeColor;模糊风格
@property (nonatomic, assign) UIBlurEffectStyle blurEffectStyle背景视图类型
@property (nonatomic, assign) HyRoundMenuViewBackgroundViewType backgroundViewType初始化方法
+(__nonnull instancetype) shareInstanceHyRoundMenuModel public method and attribute descriptionHyRoundMenuModel公有方法以及属性说明:model标题
@property (nonatomic, strong, nonnull) NSString *title设置图标
@property (nonatomic, strong, nonnull) UIImage *iconImage该属性默认为HyRoundMenuModelItmeTypeDefault
@property (nonatomic, assign, ) HyRoundMenuModelItmeType type转场方式类型
@property (nonatomic, assign, ) HyRoundMenuModelTransitionType transitionType类方法快速生成对象
+ (__nonnull instancetype)title:(NSString * __nonnull)title iconImage:(UIImage * __nonnull)image transitionType:(HyRoundMenuModelTransitionType)transitionTypegithub地址:https://github.com/wwdc14/HyRoundMenuView