我刚刚下载了 C4,并试图在一些示例代码中实现捏合手势,而我已经有了滑动手势。代码如下:
[ball addGesture:SWIPERIGHT name:@"swipeR" action:@"swipeBall"];
[ball addGesture:PINCH name:@"pinch" action:@"zoomBall"];
一旦我添加带有 PINCH 的第二行,我就会在编译时收到以下错误消息,这似乎很奇怪,因为 PINCH 列在下面错误消息中提到的列表中。有什么想法吗?
错误信息:
2012-10-10 00:58:06.166 Test[24121:10703] *** Assertion failure in -[MyBall addGesture:name:action:], /Users/moi/Development/C4Installer/libC4/libC4/C4Control.m:319
2012-10-10 00:58:06.184 Test[24121:10703] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The gesture you tried to use is not one of: TAP, PINCH, SWIPERIGHT, SWIPELEFT, SWIPEUP, SWIPEDOWN, ROTATION, PAN, or LONGPRESS'
*** First throw call stack:
(0x320022 0x1730cd6 0x2c8a48 0x99c2cb 0xcdd3 0x380b 0x3190 0xe2b386 0xe2c274 0xe3b183 0xe3bc38 0xe2f634 0x3c2eef5 0x2f4195 0x258ff2 0x2578da 0x256d84 0x256c9b 0xe2bc65 0xe2d626 0x2d3d 0x2ca5)
terminate called throwing an exception(lldb)