OGeek|极客世界-中国程序员成长平台

标题: iphone - CGAffineTransform MakeRotation 错误 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 17:42
标题: iphone - CGAffineTransform MakeRotation 错误

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

    [horizontalModeTable setTransform:CGAffineTransformMakeRotation(- M_PI_2)];

这在我之前制作的程序中运行良好,但由于某种原因,每当我尝试运行它时,我都会收到 Apple Mach-O 链接器错误:

架构 i386 的 undefined symbol :

"_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)

有人知道为什么会这样吗?我无法分辨出与我使用的另一个程序有什么区别,但是这个程序继续给我一个错误。

谢谢



Best Answer-推荐答案


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

关于iphone - CGAffineTransform MakeRotation 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7755036/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4