views:

42

answers:

1

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.navigationController 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!

+1  A: 

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

Jasarien
It is enabled. Actually, it's enabled in IB by default.
Knodel
Are you trying to receive touches on the UIImageView?
Jasarien