10

i am trying to do the half page curl feature. This is the code I am using:

#import <QuartzCore/QuartzCore.h>


CATransition *animation = [CATransition animation];
[animation setDelegate:self];
[animation setDuration:1.0f];
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
[animation setType:(notCurled ? @"mapCurl" : @"mapUnCurl")];
[animation setRemovedOnCompletion:NO];
[animation setFillMode: @"extended"];
[animation setRemovedOnCompletion: NO];
notCurled = !notCurled;

But I encounter the following errors

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_CATransition", referenced from:
      objc-class-ref in MyMapViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)


  "_OBJC_CLASS_$_CATransition", referenced from:


      objc-class-ref in SJMapViewController.o


ld: symbol(s) not found for architecture i386


clang: error: linker command failed with exit code 1 (use -v to see invocation)

How can I solve it?

kenorb
  • 155,785
  • 88
  • 678
  • 743
Xavi Valero
  • 2,047
  • 7
  • 42
  • 80

1 Answers1

23

your app is complaining it can not find CATransition Symbol.

Did you add the QuartzCore framework to your app?

If not add it: go to your target settings -> build phases -> link binary -> select the + button and select QuartzCore.

then import it where you need to use it:

      #import <QuartzCore/QuartzCore.h>
shannoga
  • 19,649
  • 20
  • 104
  • 169
  • I thought I had added the framework, rechecked it and found that I haven't added. Thanks mate. – Xavi Valero Dec 12 '11 at 09:13
  • 3
    Had this same problem but it had to do with code that I imported into my project from another library. In case anyone has that issue go into Build Phases and add the imported files to Compile Sources. – robhasacamera Jun 26 '12 at 15:10
  • Thanks, @robhasacamera, that's exactly what I needed. Couldn't figure out why I was still having the problem with the framework and imports set up correctly. – Victor Engel Jan 18 '13 at 21:38