摘要: setObject:forked:中object是不能够为nil的,不然会报错。 setValue:forKey:中value能够为nil,但是当value为nil的时候,会自动调用removeObject:forKey方法。 setValue:forKey:中key的参数只能够是NSString类 阅读全文
posted @ 2018-04-10 09:51 chihbun 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 需求背景: 使用instruments工具来更好的调试我们的工程中新开发或者修改过的模块的内存状况。 iOS设备性能越来越好,iOS App 也相应的变得越来越庞大,App代码的量级也在快速的增长,开发一个小的模块在工程中调试变的越来越难,通常我们是通过观察Allocation的内存变化高低,或者内 阅读全文
posted @ 2018-04-09 11:12 chihbun 阅读(903) 评论(0) 推荐(1) 编辑
摘要: .h .m 阅读全文
posted @ 2018-04-03 10:55 chihbun 阅读(398) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-04-03 10:52 chihbun 阅读(327) 评论(0) 推荐(0) 编辑
摘要: 代码如下 #import"ZBGuidePageView.h" @interfaceZBGuidePageView()<UIScrollViewDelegate> @property(nonatomic,strong)UIScrollView*scrollView; @property(nonato 阅读全文
posted @ 2018-04-03 10:46 chihbun 阅读(1056) 评论(0) 推荐(0) 编辑
摘要: 核心代码 阅读全文
posted @ 2018-04-03 10:43 chihbun 阅读(314) 评论(0) 推荐(0) 编辑
摘要: 1.先创建model .h .m 2.自定义cell .h .m 3.在控制器中使用 .m 阅读全文
posted @ 2018-04-03 10:34 chihbun 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 直接上代码: 1:先自定义cell .h文件中 .m文件中 2:在控制器.m文件中使用 阅读全文
posted @ 2018-04-03 10:17 chihbun 阅读(2025) 评论(0) 推荐(0) 编辑
摘要: 第一种方法: UIBlurEffect *effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]; UIVisualEffectView *effectView = [[UIVisualEffectView alloc] init 阅读全文
posted @ 2018-04-02 09:44 chihbun 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 其中有一个不太规则的label: image.png image.png 这个label顶部的两个角是圆角,底部的两个角是直角,底部还有一个小三角。 思路 CAShapeLayer联合UIBezierPath画一个不规则的layer作为label.layer的mask。 具体实现 1.自定义一个继承 阅读全文
posted @ 2018-04-02 09:35 chihbun 阅读(726) 评论(0) 推荐(0) 编辑