0

触摸按钮不会触发 segue。我需要按住按钮几秒钟才能将推送运行到另一个屏幕。

我使用故事板和 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

4

1 回答 1

0

以下代码行导致问题:

UITapGestureRecognizer *touchDismissKeyboard = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissKeyboard)];

[self.view addGestureRecognizer:touchDismissKeyboard];
于 2013-06-27T08:41:02.140 回答