1

I downloaded this sample: https://developer.apple.com/library/ios/#samplecode/Touches/Introduction/Intro.html#//apple_ref/doc/uid/DTS40007435 If I start the sample app everything is working fine.

I made my own app and copied most of the code into it. There is a method called adjustAnchorPointForGestureRecognizer: But in this method there is a error but only in my app (see screenshot): "Property anchorPoint cannot be found in forwar class object CALayer". I am wondering how I can solve this issue, I don't know what I did wrong. It is exactly the same code from the sample. Anyone can help? Thanks! enter image description here

4

1 回答 1

3

Did you import the QuartzCore framework into your project? Maybe that's why it can find the CALayer class

This error is thrown by XCode when it can't find a definition for CALayer. You should add the framework to your project and add #import <QuartzCore/QuartzCore.h> to wherever you are using the class

于 2012-09-24T17:34:09.720 回答