I have a replay level button. When the user presses this replay level button i reset all my games properties so as to reset the level. But, this is not enough. I also want to make the level look like it is completely new, so I want to add animation to the view controller exactly like the cross dissolve animation of the modal segue. So to do this, I added this code into my replayLevel method.
-(IBAction)replayLevel:(id)sender
{
//reset my levels properties
[self resetGameProperties];
//add the cool modal cross dissolve animation
CATransition *transition =[CATransition animation];
transition.duration=.5;
transition.type=kCATransitionFade;
transition.delegate=self;
[self.view.layer addAnimation:transition forKey:nil];
self.view.hidden=YES;
self.view.hidden=NO;
}
I also in my interface file remembered to add
#import <QuartzCore/QuartzCore.h>
and everything seemed to be fine, except when i build and run I get this error message
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CATransition", referenced from:
objc-class-ref in ViewController.o
"_kCATransitionFade", referenced from:
-[ViewController replayButton:] in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
If my code to duplicate a modal cross dissolve segue is bad, i would be happy to accept any different opinions as to how i should go about doing that, but otherwise, could anyone please help me get this error away?
Any help is very Helpful!