代码如下:
-(void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)InterfaceOrientation duration:(NSTimeInterval)duration {
if(InterfaceOrientation == UIInterfaceOrientationPortrait)
{
self.view =self.portrait;
self.view.transform = CGAffineTransformIdentity;
self.view.transform =
CGAffineTransformMakeRotation(degreeToRadians(0));
self.view.bounds =CGRectMake(0.0, 0.0, 320.0, 460.0);
}
这方法里面使用的CGAffineTransformIdentity和CGAffineTransformMakeRotation报错,但是输入方法的时候还有提示,但是还是报如下错误?
Undefined symbols for architecture i386:
"_CGAffineTransformMakeRotation", referenced from:
-[ViewController willAnimateRotationToInterfaceOrientation:duration:] in ViewController.o
"_CGAffineTransformIdentity", referenced from:
-[ViewController willAnimateRotationToInterfaceOrientation:duration:] 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)
-(void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)InterfaceOrientation duration:(NSTimeInterval)duration {
if(InterfaceOrientation == UIInterfaceOrientationPortrait)
{
self.view =self.portrait;
self.view.transform = CGAffineTransformIdentity;
self.view.transform =
CGAffineTransformMakeRotation(degreeToRadians(0));
self.view.bounds =CGRectMake(0.0, 0.0, 320.0, 460.0);
}
这方法里面使用的CGAffineTransformIdentity和CGAffineTransformMakeRotation报错,但是输入方法的时候还有提示,但是还是报如下错误?
Undefined symbols for architecture i386:
"_CGAffineTransformMakeRotation", referenced from:
-[ViewController willAnimateRotationToInterfaceOrientation:duration:] in ViewController.o
"_CGAffineTransformIdentity", referenced from:
-[ViewController willAnimateRotationToInterfaceOrientation:duration:] 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)
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货