开发者

Can't compile code when working with CALayer

开发者 https://www.devze.com 2023-01-02 17:38 出处:网络
For some reason I get linker errors when I try and use CALayer: \"_OBJC_CLASS_$_CALayer\", referenced from:

For some reason I get linker errors when I try and use CALayer:

  "_OBJC_CLASS_$_CALayer", referenced from:

I have imported the following headers:

#import <Foundation/Foundation.h&g开发者_StackOverflow社区t;
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>

Code:

arrowImage = [[CALayer alloc] init];


Make sure you also add the QuartzCore framework to your target. Just importing the header isn't enough.

XCode Screenshot

Can't compile code when working with CALayer

0

精彩评论

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

关注公众号