点击切换状态の按钮Multi-Button
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:...];
下载地址:http://www.wenjiangs.com/wp-content/uploads/2021/docimg35/9e50570a4332378813fe0f8931ce00ac.zip
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论