2016年8月15日

OC NSString总结

摘要: 1、初始化 2、常用方法 拼接字符串 判断是否相同字符串 [answer isEqualToString:self.currentModel.answer]//answer==self.currentModel.answer区别 3、方法的比较 NSSttring stringByAppending 阅读全文

posted @ 2016-08-15 12:55 入水 阅读(121) 评论(0) 推荐(0) 编辑

2016年8月13日

@property的几个参数

摘要: 1、strong weak 2、retain assign retain针对非基本数据类型,针对要用到堆区的属性,此关键字,编译器会为数据的 setter dealloc添加一些特殊处理,使得对堆的管理更节省更有效 @property (retain) Yard * yard; yard = yar 阅读全文

posted @ 2016-08-13 21:33 入水 阅读(335) 评论(0) 推荐(0) 编辑

UIButton总结

摘要: 1、初始化 UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; [btn setFrame:CGRectMake(100, 100, 60, 60)]; [self.view addSubview:btn]; 2、常用设置 设置 阅读全文

posted @ 2016-08-13 08:19 入水 阅读(248) 评论(0) 推荐(0) 编辑

2016年7月31日

oc中使用switch实现图片浏览功能,补充其它的实现方式

摘要: 图片浏览功能,首页和最后页,需要禁用“上下页”按钮,中间页又要恢复按钮,感觉switch比if要简洁一些: 补充switch的基本语法规则:首先执行case(case判定条件必须为常量),执行后break跳出switch代码段,遍历遇不到相应的case执行default。 case,default都 阅读全文

posted @ 2016-07-31 18:50 入水 阅读(937) 评论(0) 推荐(0) 编辑

导航