iOS核心动画高级技巧(一)

·  阅读 202

iOS核心高级技巧 - 文章链接

UIView *layerView = [[UIView alloc] initWithFrame:CGRectMake(100.0f, 100.0f, 200.0f, 200.0f)];
layerView.backgroundColor = [UIColor whiteColor];
[self.view addSubview:layerView];
    
CALayer *blueLayer = [CALayer layer];
blueLayer.frame = CGRectMake(50.0f, 50.0f, 100.0f, 100.0f);
blueLayer.backgroundColor = [UIColor blueColor].CGColor;
[layerView.layer addSublayer:blueLayer];
复制代码

Simulator Screen Shot - iPhone 8 - 2021-05-29 at 10.22.39.png

分类:
iOS
标签:
分类:
iOS
标签:
收藏成功!
已添加到「」, 点击更改