IOS: error: access to unknown component "cornerRadius" properties

I get the following exception that drives me crazy:

error: accessing unknown 'cornerRadius' component of a property

This is a line of code:

    cell.imageView.layer.cornerRadius = 20.0;

I have been following this guide since December 2010: http://www.raywenderlich.com/2502/introduction-to-calayers-tutorial

According to the documentation, UIImageView is a UIView. He has a CALAyer. CALayer has the cornerRadius property. I am on iOS 4.0.

thank

+3
source share
2 answers

Using

#import <QuartzCore/QuartzCore.h>
+7
source

Did you import QuartzCore correctly?

 #import <QuartzCore/QuartzCore.h>
+1
source

All Articles