摘要: 旋转轮子 *activityView = [[UIActivityIndicatorView alloc ]initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite]; activityView.center= CGPointM 阅读全文
posted @ 2016-04-09 09:47 meixianLYD 阅读(125) 评论(0) 推荐(0) 编辑
摘要: UIAlertView 提示用户 帮助用户选择框 // UIAlertView *alterView = [[UIAlertView alloc] initWithTitle:@"警告" message:@"你还没把信息填完" delegate:nil cancelButtonTitle:@"can 阅读全文
posted @ 2016-04-09 09:44 meixianLYD 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 两种设置背景图片方法 // UIView *navigationbarTitleTupian =[[UIView alloc]initWithFrame:CGRectMake(0, 0, 40, 30)]; // UIImageView *imageTitleTupian =[[UIImageVie 阅读全文
posted @ 2016-04-09 09:36 meixianLYD 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 关于UIView的userInteractionEnabled属性 如果父视图为ParentView包含一个Button,如果再ParentView上添加子视图ChildView,且ChildView盖住了Button,那么Button就得到不响应了,为了让Button响应,可以设置ChildVie 阅读全文
posted @ 2016-04-09 09:33 meixianLYD 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 表示图中Cell默认是不透明的,那么在设置表示图的背景颜色和图片时通常是看不到的 1.给tableView设置背景view UIImageView *backImageView=[[UIImageViewalloc]initWithFrame:self.view.bounds]; [backImag 阅读全文
posted @ 2016-04-09 09:31 meixianLYD 阅读(784) 评论(0) 推荐(0) 编辑
摘要: 创建数组规定每组个数 NSArray *array = [UIFont familyNames]; _fontArray = [[NSMutableArray alloc]initWithCapacity:13]; NSMutableArray *temp = nil; for (int index 阅读全文
posted @ 2016-04-09 09:28 meixianLYD 阅读(142) 评论(0) 推荐(0) 编辑
摘要: IOS—UITextFiled控件详解 //初始化textfield并设置位置及大小 UITextField *text = [[UITextField alloc]initWithFrame:CGRectMake(20, 20, 130, 30)]; //设置边框样式,只有设置了才会显示边框样式 阅读全文
posted @ 2016-04-09 09:26 meixianLYD 阅读(1716) 评论(0) 推荐(0) 编辑
摘要: IOS关于UIViewController之间的切换 1.NavigationController切换UIViewController的两种方式 方法一右侧进入 1 SecondViewController* svc=[[SecondViewController alloc]init]; 2 [se 阅读全文
posted @ 2016-04-09 09:17 meixianLYD 阅读(288) 评论(0) 推荐(0) 编辑
摘要: .retain 与copy区别 retain 的仅仅是引用计数加1,但是并没有创建新的对象。它们的指针是指向相同的内存地址。 copy 是创建一个新的对象作为原来对象的副本,新创建出来的引用计数并没有加1。 copy 有两中协议 第一种NSCopying 与NSMutableCopying 一种是可 阅读全文
posted @ 2016-04-09 09:15 meixianLYD 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 单例 单例模式的意思就是只有一个实例。单例模式确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例。这个类称为单例类。 一是某个类只能有一个实例;二是它必须自行创建这个实例;三是它必须自行向整个系统提供这个实例 单例模式的优点: 1.实例控制:Singleton 会阻止其他对象实例化其自 阅读全文
posted @ 2016-04-09 09:10 meixianLYD 阅读(790) 评论(0) 推荐(0) 编辑