摘要:
一.创建模型类 1.属性 @interface Model : NSObject @property(nonatomic, copy)NSString *name; @property(nonatomic, copy)NSString *gender; // 记录是否被选中 @property(no 阅读全文
posted @ 2016-02-23 20:58
mingxing
阅读(326)
评论(0)
推荐(0)
摘要:
一 创建UITableVIew对象。遵循dataSource delegate协议 1.模型转换 // 模拟假数据 - (void)setModel { self.modelArray = [NSMutableArray array]; for (int i = 0; i < 10; i ++) { 阅读全文
posted @ 2016-02-23 20:57
mingxing
阅读(210)
评论(0)
推荐(0)
摘要:
一 UITableView //UITableView 继承于UIScrollView //我们之后看到的所有能够自己滑动的视图的控件 全部都继承于UIScrollView的 UITableView *tableView = [[UITableView alloc]initWithFrame:CGR 阅读全文
posted @ 2016-02-23 20:54
mingxing
阅读(118)
评论(0)
推荐(0)
摘要:
一 导航视图控制器 ----以栈的形式管理,先进后出原则 //导航视图控制器 控制视图控制器的控制器 //导航控制器 至少要控制一个视图控制器 而被控制的控制器 称之为导航控制的根视图控制器 //导航控制器 最大的作用 是控制视图控制器之间的跳转 以及返回的层级关系 RootViewControll 阅读全文
posted @ 2016-02-23 20:52
mingxing
阅读(243)
评论(0)
推荐(0)
摘要:
一 滚动视图 //创建对象 UIScrollView *scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0,0,375,667)]; //滚动视图的背景颜色 scrollView。backgroundColor = //设置内容区 阅读全文
posted @ 2016-02-23 20:51
mingxing
阅读(160)
评论(0)
推荐(0)
摘要:
视图控制器的子视图控制器 //先创建子视图控制器 //将子视图控制器的头文件引到根视图控制器中,创建属性 //在ViewDidLoad外面写方法 -(void)initChildViewController{ //创建子视图控制器的对象 } //最后在viewDidLoad中将此方法实现 [self 阅读全文
posted @ 2016-02-23 20:50
mingxing
阅读(227)
评论(0)
推荐(0)
摘要:
一,响应事件 1 我们的程序只要运行,只要不是人为的停止程序我们的程序一直处于运行状态 2 程序在运行的时候会一直检测程序的任何响应事件,无论是点击事件,触摸事件还是晃动事件等等一切行为都会被检测 3 分为两种任务 1 检测事件:UIApplication —>UIWidow —>UIViewCon 阅读全文
posted @ 2016-02-23 20:47
mingxing
阅读(221)
评论(0)
推荐(0)
摘要:
//创建label类 - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { self.backgroundColor = [UIColor greenColor]; // label的交 阅读全文
posted @ 2016-02-23 20:46
mingxing
阅读(176)
评论(0)
推荐(0)
摘要:
自定义View中 @implementation Rootview - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { self.button = [UIButton buttonWi 阅读全文
posted @ 2016-02-23 20:44
mingxing
阅读(195)
评论(0)
推荐(0)
摘要:
// UITextField 文本输入框 // UITextField 继承与 UIControl // UIContr 继承与 UIView self.textField = [[UITextField alloc]initWithFrame:CGRectMake(100, 100, 200, 5 阅读全文
posted @ 2016-02-23 20:41
mingxing
阅读(134)
评论(0)
推荐(0)
摘要:
// 设置window坐标 //self.window = [[UIWindow alloc]initWithFrame:CGRectMake(0, 0, 375, 667)]; // 这行代码会自动根据需要帮我们生成合适的window大小 self.window = [[[UIWindow all 阅读全文
posted @ 2016-02-23 20:33
mingxing
阅读(229)
评论(0)
推荐(0)

浙公网安备 33010602011771号