开发者

View doesn't respond to touches after shake

开发者 https://www.devze.com 2022-12-23 17:01 出处:网络
In my app I\'ve implemented a shake event and it shows a UIImageView. When the UIImageView is shown, I hide the Nav Bar with:

In my app I've implemented a shake event and it shows a UIImageView. When the UIImageView is shown, I hide the Nav Bar with:

[self.navi开发者_StackOverflow社区gationController setNavigationBarHidden:YES animated:NO];

And after that I want to bring it back when user touches the screen:

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
    [[self navigationController] setNavigationBarHidden:NO animated:YES];

}

But it doesn't work! Like my view doesn't respond to touches.

Thanks in advance!


You many need to enable user interaction on your view if it isn't already.

0

精彩评论

暂无评论...
验证码 换一张
取 消