我有一个UIView,我正在尝试设置它的图层属性.
self.colorSwatch = [[UIView alloc] initWithFrame:CGRectMake(400, 150, 100, 100)];
self.colorSwatch.layer.cornerRadius = 8;
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试访问该.layer.cornerRadius属性时,我收到一条警告,指出在前向类对象'CALayer*'中找不到"属性'cornerRadius'.
这是什么意思?谢谢