欢迎光临
我们一直在努力

HyRoundMenuView

建站超值云服务器,限时71元/月

HyRoundMenuView

项目介绍:


HyRoundMenuView


image

目录:

  • 示例

  • 如何使用本项目

  • HyRoundMenuView公有方法以及属性说明

  • HyRoundMenuModel公有方法以及属性说明

Examples

示例:

image

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 description

HyRoundMenuView公有方法以及属性说明:  

  • 允许拖拽按钮 默认为->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) shareInstance

HyRoundMenuModel public method and attribute description

HyRoundMenuModel公有方法以及属性说明:  

  • 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)transitionType

github地址:https://github.com/wwdc14/HyRoundMenuView

code4app

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » HyRoundMenuView
分享到: 更多 (0)