我想让我的视图转换为从右向左滑动,而不是从左到右滑动。所以我找到了这段代码:
- (void) imgSlideInFromLeft : (UIView *) view
{
CATransition *transition = [CATransition animation];
transition.duration = 0.4;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionPush;
transition.subtype =kCATransitionFromLeft;
transition.delegate = self;
[view.layer addAnimation:transition forKey:nil];
}
然后我添加了QuartzCore的框架并导入了<QuartzCore/QuartzCore.h>
,但我现在收到了这些错误:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CAMediaTimingFunction", referenced from:
objc-class-ref in SearchResultsController.o
"_OBJC_CLASS_$_CATransition", referenced from:
objc-class-ref in SearchResultsController.o
"_kCAMediaTimingFunctionEaseInEaseOut", referenced from:
-[SearchResultsController imgSlideInFromLeft:] in SearchResultsController.o
"_kCATransitionFromLeft", referenced from:
-[SearchResultsController imgSlideInFromLeft:] in SearchResultsController.o
"_kCATransitionPush", referenced from:
-[SearchResultsController imgSlideInFromLeft:] in SearchResultsController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
答案 0 :(得分:5)
您好像忘记将QuartzCore.framework
添加到自己的应用中了?