Unable to compile code when working with CALayer

For some reason, I get linker errors when trying to use CALayer:

"_OBJC_CLASS_$_CALayer", referenced from: 

I have imported the following headers:

 #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #import <QuartzCore/QuartzCore.h> 

the code:

 arrowImage = [[CALayer alloc] init]; 
+39
objective-c iphone cocoa-touch cocoa quartz-graphics
Jun 03 '10 at 16:53
source share
1 answer

Make sure you also add the QuartzCore structure to your goal. Just importing a title is not enough.

Xcode Screenshot enter image description here

+79
Jun 03 '10 at 17:00
source share



All Articles