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无效 //继承于 ...
随机推荐
- 2016 12 21 的project 未注释版
#include<stack>#include<iostream>#include<queue>#include<string>#include< ...
- Java中的equals和hashCode方法
本文转载自:Java中的equals和hashCode方法详解 Java中的equals方法和hashCode方法是Object中的,所以每个对象都是有这两个方法的,有时候我们需要实现特定需求,可能要 ...
- ASP.NET Web服务调用发生错误,错误代码404
现象: iOS端使用ASIHTTP连接Web服务时,得到的数据是一个错误代码为404的页面,错误信息(web.config添加<customErrors mode="Off" ...
- 关于原生JS获取类相关的代码
<script> var FungetElementsByClassName = function(str,root,tag){ if(root){ root = typeof root ...
- vb- ----之常用函数
[VB]常用函数 2007-10-25 10:52 3375人阅读 评论(1) 收藏 举报 vbstringdateintegervbscriptwindows (一)类型转换类函数1. CType( ...
- SQL中的共享锁分析及如何解锁
1.1.1 摘要 在系统设计过程中,系统的稳定性.响应速度和读写速度至关重要,就像12306.cn那样,当然我们可以通过提高系统并发能力来提高系统性能总体性能,但在并发作用下也会出现一些问题,例如死锁 ...
- Python-变量
1.Python的变量是什么 变量是用来存储计算机程序中的信息,唯一的目的是将数据存储在内存中. 2.Python变量的组成 变量由字母.数字.下划线组成: 变量的第一位不能是数字,可以是字母或下划线 ...
- 走读openwrt的shell的总结【转】
原文:http://blog.chinaunix.net/uid-26598889-id-3060543.html ". /etc/diag.sh" 就是将/etc/diag.sh ...
- 黑马程序员+Winform基础(下)
---------------<a href="http://edu.csdn.net"target="blank">ASP.Net+Android ...
- 微信公共平台开发-(.net实现)2--ACCESSTOKEN值获得
成功的走出第一步后,我们紧接着趁热打铁开始下一步: 成为了开发者之后微信平台会给您AppId和AppSecret,在订阅号中是没有的,所以因该申请一下服务号, 若没有请注意上一篇http://www. ...