![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
IOS-UI
文章平均质量分 93
low-profile
这个作者很懒,什么都没留下…
展开
-
iOS离屏渲染
界面渲染UIView继承自UIResponder,可以处理系统传递过来的事件,如:UIApplication、UIViewController、UIView,以及所有从UIView派生出来的UIKit类。每个UIView内部都有一个CALayer提供内容的绘制和显示,并且作为内部RootLayer的代理视图。下图为CALayer的结构图:RunLoop有一个60fps的回调,即每16.7ms绘制一次屏幕,所以view的绘制必须在这个时间内完成,view内容的绘制是CPU的工作,然后把绘制的内容交给G原创 2021-12-25 22:08:38 · 1967 阅读 · 0 评论 -
UIViewController的生命周期
1、UIViewController有自己的生命周期,因为UIViewController是ios的重要组成部分,所以了解其生命周期就显得尤为重要了。// 非storyBoard(xib或非xib)都走这个方法- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {...原创 2019-06-18 20:01:14 · 801 阅读 · 0 评论 -
CALayer图层
图层CALayer与UIView息息相关,在UI上可实现形状定义、绘图、背景定义等操作1、定义图层属性CALayer *layer = [CALayer layer];layer.backgroundColor = [UIColor blueColor].CGColor;layer.bounds = CGRectMake(50, 0, 200, 200);layer.position =...原创 2019-06-18 19:28:40 · 120 阅读 · 0 评论