CGAffineTransformMakeRotation错误

时间:2011-10-13 13:42:22

标签: iphone objective-c ios xcode

我有一个tableView,我使用setTransform方法和CGAffineTransformMakeRotation向左旋转90度:

    [horizontalModeTable setTransform:CGAffineTransformMakeRotation(- M_PI_2)];

这在我之前的程序中完美运行,但出于某种原因,每当我尝试运行时,我都会遇到Apple Mach-O链接器错误:

架构i386的未定义符号:

"_CGAffineTransformMakeRotation", referenced from:
  -[ScalePickerVC viewDidLoad] in ScalePickerVC.o
  -[ScalePickerVC tableView:cellForRowAtIndexPath:] in ScalePickerVC.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

有人理解为什么会这样吗?我不能说我用过的另一个程序有什么不同,但是这个程序继续给我一个错误。

由于

1 个答案:

答案 0 :(得分:4)

CGAffineTransformMakeRotation在Core Graphics中声明,链接器告诉您它没有看到该符号的定义。您需要将Core Graphics框架添加到项目中。

相关问题