你的位置:首页 > 软件开发 > 操作系统 > OtherViews系统控件

OtherViews系统控件

发布时间:2017-03-11 00:00:25
效果 特点1).都是系统自己的控件,只是做一个基础知识的归纳总结 源码github:https://github.com/makingitbest/OtherViews 细节1.UISwitch#import "ViewController_0.h&quot ...

OtherViews系统控件

效果

OtherViews系统控件

 特点

1).都是系统自己的控件,只是做一个基础知识的归纳总结

 

源码

github:https://github.com/makingitbest/OtherViews

 

细节

1.UISwitch

#import "ViewController_0.h"@interface ViewController_0 ()@end@implementation ViewController_0- (void)viewDidLoad {    [super viewDidLoad];    // initWithFrame 并不能调整按钮的大小,只能设置它的位置.  UISwitch *swtch   = [[UISwitch alloc] initWithFrame:CGRectMake(100, 150, 100, 100)];  swtch.tintColor   = [UIColor redColor];  // 关闭状态下的颜色  swtch.onTintColor  = [UIColor blueColor]; // 打开状态下的颜色  swtch.thumbTintColor = [UIColor brownColor]; // 滑块颜色  [swtch setOn: YES]; //设置打开按钮,显示的是打开状态的颜色;事实上默认是关闭按钮  [self.view addSubview:swtch];    swtch.onImage = [UIImage imageNamed:@"onimage"]; //在没有设置onTintColor的时候有效,其他事件无效  swtch.offImage = [UIImage imageNamed:@"onimage"]; //在没有设置tintColor的时候有效,其他事件无效}@end

原标题:OtherViews系统控件

关键词:ie

ie
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。