0

我正在使用动态表视图。正如之前的回复(如何知道 UITableview 行号)中所建议的那样,我尝试使用 CGPoint。

CGPoint hitPoint = [sender convertPoint:CGPointZero toView:self.tableView]; 
NSIndexPath *hitIndex = [self.tableView indexPathForRowAtPoint:hitPoint];

我得到调试器错误

Undefined symbols for architecture i386:
  "_CGPointZero", referenced from:
      -[MessageTableViewController btnCall:] in MessageTableViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

这是什么意思,不支持 i386 或者我需要以某种方式设置 GCPointZero?

谢谢!

4

3 回答 3

2

您必须链接CoreGraphics framework.

于 2013-02-19T19:38:56.037 回答
0

尝试像这样在您的课程中导入 Coregraphics 框架

 #import <CoreGraphics/CoreGraphics.h>
于 2013-02-19T19:30:17.993 回答
0

CGPointZeroCoreGraphics框架的一部分。所以你有两种方法可以解决这个问题。

  1. 您链接到CoreGraphics框架,因为@user529758 已在此处回答。

或者

  1. 正如文档CGPointZero所说,它是一个快捷方式CGPointMake(0,0)

位置为 (0,0) 的点常数。零点等价于 CGPointMake(0,0)。

所以你可以CGPointZeroCGPointMake(0,0).

于 2019-07-04T09:15:00.167 回答