首页 > 其他 > 详细

UISwitch

时间:2015-01-22 21:40:12      阅读:373      评论:0      收藏:0      [点我收藏+]
        UISwitch *noticeSwtich = [[UISwitch alloc] initWithFrame:CGRectMake(0, 0, 51, 31)];
//        noticeSwtich.layer.cornerRadius = noticeSwtich.height/2;
//        noticeSwtich.backgroundColor = RGB(0, 187, 39);
//        noticeSwtich.tintColor = RGB(0, 187, 39);//设置关着的时候的颜色
        noticeSwtich.onTintColor = RGB(0, 187, 39);//设置开着的时候的颜色
        [noticeSwtich addTarget:self action:@selector(noticeSwitchAction:) forControlEvents:UIControlEventValueChanged];
        cell.accessoryView = noticeSwtich;

 

UISwitch

原文:http://www.cnblogs.com/shidaying/p/4242520.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!