JZMultiChoicesCircleButton

加入收藏
已有 4 人收藏

介绍:
    一个带视差效果的多选按钮。需要长推自己的选择项才会执行选择,效果佳。支持cocoapods,只需在podfile 中添加 pod "JZMultiChoicesCircleButton"。

    

    使用方法:

    #import "JZMultiChoicesCircleButton.h"

    

    - (void)viewDidLoad {

     [super viewDidLoad];

     NSArray *IconArray = [NSArray arrayWithObjects: [UIImage imageNamed:@"SendRound"],[UIImage imageNamed:@"CompleteRound"],[UIImage imageNamed:@"CalenderRound"],[UIImage imageNamed:@"MarkRound"],nil];

     NSArray *TextArray = [NSArray arrayWithObjects: [NSString stringWithFormat:@"Send"],[NSString stringWithFormat:@"Complete"],[NSString stringWithFormat:@"Calender"],[NSString stringWithFormat:@"Mark"], nil];

     NSArray *TargetArray = [NSArray arrayWithObjects:[NSString stringWithFormat:@"ButtonOne"],[NSString stringWithFormat:@"ButtonTwo"],[NSString stringWithFormat:@"ButtonThree"],[NSString stringWithFormat:@"ButtonFour"] ,nil];

    

     NewBTN = [[JZMultiChoicesCircleButton alloc] initWithCenterPoint:CGPointMake(self.view.frame.size.width / 2 , self.view.frame.size.height / 2 )

     ButtonIcon:[UIImage imageNamed:@"send"]

     SmallRadius:30.0f

     BigRadius:120.0f

     ButtonNumber:4

     ButtonIcon:IconArray

     ButtonText:TextArray

     ButtonTarget:TargetArray

     UseParallex:YES

     ParallaxParameter:300

     RespondViewController:self];

     [self.view addSubview:NewBTN];

    

    }

测试环境:
  [Code4App]编译测试
效果图:
  • iOS / iPhone / iPad 一个带视差效果的多选按钮。需要长推自己的选择项才会执行选择,效果佳。支持cocoapods,只需在podfile 中添加 pod "JZMultiChoicesCircleButton"。<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;使用方法:<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;#import "JZMultiChoicesCircleButton.h"<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;- (void)viewDidLoad {<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;    [super viewDidLoad];<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;    NSArray *IconArray = [NSArray arrayWithObjects: [UIImage imageNamed:@"SendRound"],[UIImage imageNamed:@"CompleteRound"],[UIImage imageNamed:@"CalenderRound"],[UIImage imageNamed:@"MarkRound"],nil];<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;    NSArray *TextArray = [NSArray arrayWithObjects: [NSString stringWithFormat:@"Send"],[NSString stringWithFormat:@"Complete"],[NSString stringWithFormat:@"Calender"],[NSString stringWithFormat:@"Mark"], nil];<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;    NSArray *TargetArray = [NSArray arrayWithObjects:[NSString stringWithFormat:@"ButtonOne"],[NSString stringWithFormat:@"ButtonTwo"],[NSString stringWithFormat:@"ButtonThree"],[NSString stringWithFormat:@"ButtonFour"] ,nil];<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;    NewBTN = [[JZMultiChoicesCircleButton alloc] initWithCenterPoint:CGPointMake(self.view.frame.size.width / 2 , self.view.frame.size.height / 2 )<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;                                                                                      ButtonIcon:[UIImage imageNamed:@"send"]<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;                                                                                     SmallRadius:30.0f<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;                                                                                       BigRadius:120.0f<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;                                                                                    ButtonNumber:4<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;                                                                                      ButtonIcon:IconArray<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;                                                                                      ButtonText:TextArray<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;                                                                                    ButtonTarget:TargetArray<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;                                                                                     UseParallex:YES<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;                                                                               ParallaxParameter:300<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;                                                                           RespondViewController:self];<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;    [self.view addSubview:NewBTN];<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;}
代码评论:
登录后方可评论

  
  • 2016-04-05 18:03:54
    回复
    问你为什么要让屏幕变红呢,关键还找不到在哪,你这不脑残吗,点击按钮输出个东西不就行了,还改变屏幕颜色
    登录后方可评论