代码库> 按钮> 点击切换状态の按钮Multi-Button
点击切换状态の按钮Multi-Button
关注
上传者:MrQ 分类:按钮(Button)
查看次数:516 下载次数:32
上传时间:2016-10-13 大小:159 B
Multi-Button, click button change the state. 多功能按钮,点击变换状态.

喜欢就点个star O(∩_∩)O谢谢
GitHub: https://github.com/qianlishun/MultiButton.git

下载命令: git clone https://github.com/qianlishun/MultiButton.git
使用


MultiButton *btn = [[MultiButton alloc]initWithFrame:CGRectMake(0, 0, 200, 30)];
btn.center = CGPointMake(self.view.center.x, 300);
[btn setName:@"volume" state:@"11"];
[self.view addSubview:btn];

MultiButton *btn = [[MultiButton alloc]initWithFrame:CGRectMake(0, 0, 200, 30)];
btn.center = CGPointMake(self.view.center.x, 300);
[btn setName:@"volume" state:@"ON|OFF"];
[self.view addSubview:btn];


You also can addTarget

[btn addTarget:self action:@selector(timeDidClick) forControlEvents:UIControlEventTouchUpInside];

Style

[btn setBackgroundImage:[UIImage imageNamed:@"xxx.png"]];

[btn setBackgroundColor:[UIColor orangeColor]];

[btn.titleLabel setFont:...];

[btn.detailLabel setFont:...];
收藏
我来说两句
发表评论
您还没有登录!请登录注册
所有评论(0
综合评论
提示
sina weixin mail 回到顶部