これは私の最初の質問ですが、この数か月間、このサイトを頻繁に使用しています (ありがとうございます)。
私の問題: iPad 用の分割ビュー プロジェクトがあります。DetailViewController では、UIButton を使用します。DetailViewController.hのコードを次に示します。
@property (strong, nonatomic) IBOutlet UIButton *button;
- (void)swipeRightDetected:(UISwipeGestureRecognizer *)recognizer;
DetailViewController.mでは、次のようにします。
- (void)viewDidLoad
{
[super viewDidLoad];
[self configureView];
UISwipeGestureRecognizer *swipeRight = [[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(swipeRightDetected:)];
swipeRight.direction = UISwipeGestureRecognizerDirectionRight;
[self.button addGestureRecognizer:swipeRight];
}
- (void)swipeRightDetected:(UISwipeGestureRecognizer *)recognizer
{
if (recognizer.view == self.button) {
NSLog(@"YEAH");
}
}
問題は、iOS 5.0.1 以前では完全に動作していたことです。今ではもう機能しません。他の方向には機能しますが、右方向には機能せず、DetailViewController でのみ機能します!! iPad を強さと速さで (平手打ちのように!) 叩いた場合にのみ機能し、シミュレーターでも同じことができます。スワイプを非常に非常に速く行った場合にのみ機能します!
バグだと思います..どうすればいいですか?同じ質問をアップル フォーラムに投稿してみてはいかがでしょうか。ありがとうございます!マルコ