2

我试图在动画期间隐藏导航栏“后退”按钮。动画完成后,按钮会重新出现。

我的代码如下:

- (void) animateResults {

    [self hideNavBarButtons];

    [self animatePlayer1];
    [self animatePlayer2];

    [self performSelector:@selector(showNavBarButtons) withObject:nil afterDelay:3.0];


}


- (void) hideNavBarButtons {

    [self.navigationItem setHidesBackButton:YES animated:YES];

}

- (void) showNavBarButtons {

    [self.navigationItem setHidesBackButton:NO animated:YES];

}

这在模拟器上运行良好......但我在设备上得到了奇怪的结果。这是非常不一致的,并且在几次尝试后停止隐藏“后退”按钮。我假设我有一些代表搞砸了..但我迷路了。任何帮助表示赞赏。

谢谢。

4

0 回答 0