摘要: // 实例化一个ScrollView UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; scrollView.backgroundColor = [UICol 阅读全文
posted @ 2017-01-03 18:08 朝阳向日葵 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 一、UITabBarController主要用来管理你提供的content view controllers,而每一个 content view controller则负责管理自己的view层级关系,通常,当你的程序想要提供一些平行(同一个等级的)的不同界面,而恰好这些界面使用到的数据是一类的,或者 阅读全文
posted @ 2017-01-03 11:54 朝阳向日葵 阅读(353) 评论(0) 推荐(0) 编辑
摘要: - (void)viewDidLoad { [super viewDidLoad]; UIWebView *webView = [[UIWebView alloc] initWithFrame:self.view.bounds]; webView.delegate = self; //设置代理 [s 阅读全文
posted @ 2017-01-03 11:18 朝阳向日葵 阅读(132) 评论(0) 推荐(0) 编辑
摘要: - (void)viewDidLoad { [super viewDidLoad]; UIButton *alertBtn = [UIButton buttonWithType:UIButtonTypeSystem]; alertBtn.frame = CGRectMake(40, 100, 295 阅读全文
posted @ 2017-01-03 11:17 朝阳向日葵 阅读(132) 评论(0) 推荐(0) 编辑
摘要: - (void)viewDidLoad { [super viewDidLoad]; UISwitch *swc = [[UISwitch alloc] initWithFrame:CGRectMake(40, 100, 295, 30)]; [swc addTarget:self action:@ 阅读全文
posted @ 2017-01-03 11:16 朝阳向日葵 阅读(89) 评论(0) 推荐(0) 编辑
摘要: - (void)viewDidLoad { [super viewDidLoad]; UIButton *btn = [UIButton buttonWithType:UIButtonTypeSystem]; btn.frame = CGRectMake(40, 100, 295, 30); [bt 阅读全文
posted @ 2017-01-03 11:15 朝阳向日葵 阅读(145) 评论(0) 推荐(0) 编辑
摘要: - (void)viewDidLoad { [super viewDidLoad]; // 创建一个UIActivityIndicatorView,大小是固定的 UIActivityIndicatorView *aiv = [[UIActivityIndicatorView alloc] initW 阅读全文
posted @ 2017-01-03 11:14 朝阳向日葵 阅读(154) 评论(0) 推荐(0) 编辑
摘要: - (void)viewDidLoad { [super viewDidLoad]; // 实例化UISwitch,固定大小 UISwitch *swc = [[UISwitch alloc] initWithFrame:CGRectMake(40, 100, 295, 30)]; // 主题颜色 阅读全文
posted @ 2017-01-03 11:12 朝阳向日葵 阅读(130) 评论(0) 推荐(0) 编辑
摘要: - (void)viewDidLoad { [super viewDidLoad]; // 实例化 UIProgressView,高度是固定的 UIProgressView *progressView = [[UIProgressView alloc] initWithFrame:CGRectMak 阅读全文
posted @ 2017-01-03 11:11 朝阳向日葵 阅读(144) 评论(0) 推荐(0) 编辑
摘要: - (void)viewDidLoad { [super viewDidLoad]; // 实例化UIStepper,大小是固定的 UIStepper *stepper = [[UIStepper alloc] initWithFrame:CGRectMake(40, 100, 295, 200)] 阅读全文
posted @ 2017-01-03 11:10 朝阳向日葵 阅读(152) 评论(0) 推荐(0) 编辑
摘要: - (void)viewDidLoad { [super viewDidLoad]; NSArray *items = @[@"消息", @"电话"]; UISegmentedControl *segment = [[UISegmentedControl alloc] initWithItems:i 阅读全文
posted @ 2017-01-03 11:09 朝阳向日葵 阅读(173) 评论(0) 推荐(0) 编辑
摘要: - (void)viewDidLoad { [super viewDidLoad]; // 实例化UISlider,高度对外观没有影响 UISlider *slider = [[UISlider alloc] initWithFrame:CGRectMake(40, 100, 295, 30)]; // 设置Slider的最大值和最小值 ... 阅读全文
posted @ 2017-01-03 11:07 朝阳向日葵 阅读(319) 评论(0) 推荐(0) 编辑