CALayer的属性一堆,这些都是??,下面就来测试一下各个属性都什么效果~
先建一个基本的洋红色方块
func testLayerProperty(){ myLayer = CALayer() myLayer.frame = CGRectMake(100, 100, 100, 100) myLayer.backgroundColor = UIColor.magentaColor().CGColor self.view.layer.addSublayer(myLayer) }
Swift开发之CALayer---- Modifying the Layer's Appearance
时间: 2024-11-05 10:33:03