13

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.

Jacob Relkin
  • 161,348
  • 33
  • 346
  • 320
Rudiger
  • 6,749
  • 13
  • 51
  • 102

2 Answers2

30

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


alt text

alt text

Jacob Relkin
  • 161,348
  • 33
  • 346
  • 320
  • 1
    Thats lame, I have actually imported it and I have been using it in other parts in my project so didn't think about it. Reimported it and it worked. – Rudiger Oct 10 '10 at 23:18
  • You were exactly right! Thank you for providing the solution to my problem. – AddisDev Jul 26 '12 at 21:33
6

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

Matthias Bauch
  • 89,811
  • 20
  • 225
  • 247