iOS

CALayer Properties cannot be accessed in XCode 4.2 Lion

I am using XCode 4.2 with Lion 1.7


Property 'anchorPoint' cannot be found in forward class object 'CALayer *'
Property 'cornerRadius' cannot be found in forward class object 'CALayer *'
Property 'borderWidth' cannot be found in forward class object 'CALayer *'

This was the error I was getting when ever I was trying to access the properties of layer class. Just one import solved all my problems and I got the things working

Import the QuartzCore.framework in your resources and you need to import the following in the class you want to access the properties of layer.

#import

I hope this helps

Advertisements