Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compile error trying to use CAGradientLayer

I'm trying to use CAGradientLayer and getting an unhelpful compile error. Can't figure out whats wrong. All I'm doing so far is:

CAGradientLayer *gradient = [CAGradientLayer layer];

I've imported <QuartzCore/QuartzCore.h> and I'm getting the warning >

_OBJC_CLASS_$CAGradientLayer referenced from: objc-class-ref-to-CAGradientLayer symbol(s) not found.

I've tried clean and build but no luck and I can't seem to target anything other than 4.1 in Xcode

Cheers for any help.

like image 418
Rudiger Avatar asked Oct 10 '10 23:10

Rudiger


2 Answers

You didn't correctly add the QuartzCore framework into your project:


alt text

alt text

like image 64
Jacob Relkin Avatar answered Nov 15 '22 13:11

Jacob Relkin


You have to add the QuartzCore-Framework to your project.

like image 34
Matthias Bauch Avatar answered Nov 15 '22 14:11

Matthias Bauch