触摸按钮不会触发segue。我需要按住按钮几秒钟才能将按钮运行到另一个屏幕。
我使用Storyboards和IOS 5.
在IOS6中工作。
有任何研究建议吗?
由于
编辑:
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
UITapGestureRecognizer *touchDismissKeyboard = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissKeyboard)];
[self.view addGestureRecognizer:touchDismissKeyboard];
[[self navigationController] setNavigationBarHidden:YES animated:NO];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
-(void)dismissKeyboard
{
}
以下代码行导致问题:
UITapGestureRecognizer *touchDismissKeyboard = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissKeyboard)];
[self.view addGestureRecognizer:touchDismissKeyboard];
在IOS 6工作但在IOS5中触摸按钮很长时间(4-5秒)是必要的触发segue
答案 0 :(得分:0)
以下代码行导致问题:
UITapGestureRecognizer *touchDismissKeyboard = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissKeyboard)];
[self.view addGestureRecognizer:touchDismissKeyboard];