터지하면 status bar (상태바), navigation bar (네비게이션바) 숨겼다 보였다 하기


탭(터치)하면 보였다가 다시한번하면 안보이게 하는 소스~


- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
    NSLog(@"OK");
    if ([UIApplication sharedApplication].isStatusBarHidden)
    {
        [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation: UIStatusBarAnimationFade];
        self.navigationController.navigationBarHidden = NO;
    }
    else
    {
        [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation: UIStatusBarAnimationFade];
        self.navigationController.navigationBarHidden = YES ;
    }
}






0 댓글