开发者

iOS: 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜