UISwitch
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的更多相关文章
- UI第十节——UISwitch
- (void)viewDidLoad { [super viewDidLoad]; // 实例化UISwitch,固定大小 UISwitch *swc = [[UISwit ...
- UI中一些不常用的控件UIActivityIndicatorView、UIProgressView、UISegmentedControl、UIStepper、UISwitch、UITextView、UIAlertController
//UIActivityIndicatorView //小菊花,加载 #import "ActivityIndicatorVC.h" @interface ActivityIndi ...
- UILabel UISwitch UISegmentedControl UIAlertView
基础小控件 /***************************************UIlabel*************************************/ UILabel ...
- UISwitch控件的使用
UISwitch控件的作用是提供一个开关给用户,用户可以选择打开或者关闭. UISwitch的基本属性包括: 1.onTintColor:打开状态下的背景颜色 2.thumbTintColor:滑块的 ...
- UIImageView、UISlider、UISwitch、UIStepper、UISegmentControl
UIImageView——图像视图 作用:专门用来显示图片的控件 . 设置图像 [self.imageView setImage:[UIImage imageNamed:@"abc.png& ...
- UISwitch(开关控件)、UISegmentedControl(分段控件)
一.UISwitch 1.初始化 UISwitch *s1 = [[UISwitch alloc]initWithFrame:CGRectMake(50, 170, 100, 200)]; 2.设 ...
- IOS开发UI基础UISwitch属性
UISwitch属性1. onTintColor 处于on时switch 的颜色 switchImage.onTintColor = [UIColor grayColor];2.tintC ...
- 简单认识UISwitch
以下是常用属性: self.mySwitch.layer.cornerRadius = 15; // 边框圆角角度 self.mySwitch.layer.borderWidth = 2; // ...
- UISwitch和UIActivity的使用
- (void)viewDidLoad{ [super viewDidLoad]; //创建一个开关控件,苹果给它固定的size(79*27),frame更改size无效 //继承于 ...
随机推荐
- 关于git(分布式版本控制系统)的一些操作和命令
很久没上博客写东西了,今天闲着无聊就不想敲代码,所以看了看有没有一些好玩的东西,这不让我发现了git这个源代码版本控制工具,话不多说,就让我来简单的分享一下它的一些操作和命令以及命令所执行的含义吧! ...
- css3动画之图片旋转
直接上代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UT ...
- JAVA 异常类
1.Exception(异常) :是程序本身可以处理的异常. 2.Error(错误): 是程序无法处理的错误.这些错误表示故障发生于虚拟机自身.或者发生在虚拟机试图执行应用时,一般不需要程序处理. 3 ...
- .Net Webconfig连接字符串中数据库实例名带'\'的问题
获取前: 获取后: 导致sa登录失败的问题 string strCon = "workstation id=localhost;packet size=4096;user id=" ...
- VS2015调试UWP程序时提示错误DEP0700 : Registration of the app failed. Another user has already installed
在同一台windows10电脑上调试过一个工程以后,切换了账号再次调试出现错误 DEP0700 : Registration of the app failed. Another user has a ...
- canvas,画个纸飞机
在浏览器中的效果图: 代码如下: 主要练习下用javascript在canvas画画,至于能不能画的好看,可能看美术细菌,嘿嘿.10分钟搞定
- JBoss CLI
转自http://www.cnblogs.com/inteliot/archive/2012/08/05/2623719.html 为 了便于维护和管理, JBoss AS 7 提供了命令行接口( ...
- mysql group_concat 使用 (按分组组合字段)
语法: GROUP_CONCAT([DISTINCT] expr [,expr ...][ORDER BY {unsigned_integer | col_name | expr}[ASC | DES ...
- C++ REST SDK in Visual Studio 2013
The C++ REST project provides a modern asynchronous C++ API for cloud-based client-server communicat ...
- 升级ruby后再安装cocodPod
1.移除现有的Ruby $gem sources --remove https://rubygems.org/ 2.使用淘宝镜像 $gem sources -a https://ruby.taobao ...