我遇到了GestureRecognizer和BlocksKit的問題,它給我一個構建錯誤。BlockKit Xcode構建錯誤的GestureRecognizer塊
基本上我想在手勢上運行一個塊。我從這裏的文件複製的代碼....
http://zwaldowski.github.com/BlocksKit/Documentation/Categories/UIGestureRecognizer(BlocksKit).html
...當我每次都收到同樣的生成錯誤到目前爲止,我沒有成功。我搜查了周圍,找不到任何與我有同樣的問題,所以我希望有人在這裏也許可以幫助。
使用的代碼IM是...
UITapGestureRecognizer *singleTap = [UITapGestureRecognizer recognizerWithHandler:^(id sender) {
NSLog(@"Single tap.");
} delay:0.18];
我收到的是錯誤...
/Users/JohnSlater/Desktop/iOS Apps/Flink/flink/ViewController.m:202:91: Incompatible block pointer types sending 'void (^)(id)' to parameter of type 'BKGestureRecognizerBlock' (aka 'void (^)(UIGestureRecognizer *, UIGestureRecognizerState, CGPoint)')
在此先感謝
http://code.google.com/p/standard-iphone-app/source/browse/trunk/BKGlobals.h – bryanmac
1 - 無效的typedef(^ BKGestureRecognizerBlock)(UIGestureRecognizer *發件人,UIGestureRecognizerState狀態,CGPoint位置); – bryanmac