[英]Simple Question about CGRectIntersectsRect
I just have one simple question. 我只有一个简单的问题。 Everytime I use
每次我用
CGRectIntersectsRect(view1.frame, view2.frame)
I get a linker error stating the linker cannot find the files necessary to compile this method. 我收到一个链接器错误,指出链接器找不到编译此方法所需的文件。 I do have QuartzCore imported, I'm assuming theres another header I need.
我确实导入了QuartzCore ,我假设还需要另一个头。 Sadly scouring the internet has left me nowhere, and I known this is definetely a simple issue that I keep overlooking.
可悲的是,搜寻互联网使我无处可去,我知道这绝对是我一直忽略的简单问题。 Any answers are appreciated!
任何答案表示赞赏!
Notice: I am using XCode 4 and iOS 5 beta 注意:我正在使用XCode 4和iOS 5 beta
You want CGRectIntersectsRect
, not GCRectIntersectsRect
. 您需要
CGRectIntersectsRect
,而不是GCRectIntersectsRect
。 Make sure you also import the frameworks into your project. 确保您还将框架导入到项目中。
EDIT: Did you add the QuartzCore
framework to your project? 编辑:您是否将
QuartzCore
框架添加到您的项目? If not, click on the blue project icon in the top left of Xcode under Run , click on the target , and under the Build Phases tab, select the Link Binary with Libraries option, click on the + , and then add the QuartzCore
framework. 否则,请单击Xcode左上方运行菜单下的蓝色项目图标,单击目标 ,然后在“ 构建阶段”选项卡下,选择“ 使用库链接二进制文件”选项,单击+ ,然后添加
QuartzCore
框架。
Hope that helps! 希望有帮助!
Import the CoreGraphics framework also. 还导入CoreGraphics框架。 (Not 100% how to think about the distinction between this and QuartzCore, but they are different.)
(不是100%如何考虑它与QuartzCore之间的区别,但是它们是不同的。)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.