开发者

iOS: error: accessing unknown 'cornerRadius' component of a property

开发者 https://www.devze.com 2023-03-12 22:27 出处:网络
I\'m getting the following exception which is driving me crazy: error: accessing unknown \'cornerRadius\' component of a开发者_如何转开发 property

I'm getting the following exception which is driving me crazy:

error: accessing unknown 'cornerRadius' component of a开发者_如何转开发 property

This is the line of code:

    cell.imageView.layer.cornerRadius = 20.0;

I'm following this tutorial from December 2010: http://www.raywenderlich.com/2502/introduction-to-calayers-tutorial

According to the documentation UIImageView is a UIView. It has a CALAyer. CALayer has cornerRadius property. I'm on iOS 4.0.

thanks


Use

#import <QuartzCore/QuartzCore.h>


Have you correctly imported QuartzCore?

 #import <QuartzCore/QuartzCore.h>
0

精彩评论

暂无评论...
验证码 换一张
取 消