我在我的应用程序中使用SWRevealViewController,并遇到问题。我在场景中有一个文本框,如果我在键盘打开时向左滑动,出现菜单,但不会关闭键盘。如何在左侧滑动时关闭键盘? 我试图SWRevealViewController在刷卡时关闭键盘
UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(dismissKeyboard)];
swipe.direction = UISwipeGestureRecognizerDirectionLeft;
[self.view addGestureRecognizer:swipeRecognizer];
-(void)dismissKeyboard
{
[self.textField resignFirstResponder];
}
,但它不工作,我想是因为我已经在使用一个panGestureRecognizer为revealViewcontroller即[self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer];
我也使用UITapGestureRecognizer
但它仅适用于自来水不刷卡。 我希望这个问题有一个非常简单的解决方案,任何人都可以帮忙吗?
谢谢,FrontView中的
看到我的答案希望可以帮助你.. –
看到我更新了我的答案检查它 –