![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
OC
文章平均质量分 78
清幽竹客
这个作者很懒,什么都没留下…
展开
-
iOS 设计模式 浅析MVC、MVP、MVVM
一、MVC (Model、View、Controller)苹果官方推荐的架构模式(MVC),最核心的就是通过Controller层来进行控制,首先看一下官方提供的MVC示意图,如下图所示:1、MVC各层职责1.1、controller层生成view,然后组装view响应View的事件和作为view的代理处理view的生命周期处理界面之间的跳转调用model的数据获取接口,拿到返回数据,处理加工,渲染到view显示1.2、model层业务逻辑封装提供数据接口给controller原创 2021-10-15 09:58:57 · 1835 阅读 · 0 评论 -
NSTimer使用注意总结
使用下面两个定时器的使用是等价的self.timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(test) userInfo:nil repeats:YES]; self.timer = [NSTimer timerWithTimeInterval:1.0 target:self selector:@selector(test) userInfo:nil repeats:YES];原创 2021-10-15 09:40:39 · 306 阅读 · 0 评论