statusbar 隐藏

方法1:
 [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];
方法2:
UIView *proxyView = [[UIView alloc] initWithFrame:self.view.frame];
    proxyView.hidden=YES;
    proxyView.autoresizingMask= self.view.autoresizingMask;
    [self.view.superview addSubview:proxyView];
    [self.view.window addSubview:self.view];
    self.view.frame = [self.view.window convertRect:self.view.frame fromView:proxyView.superview];
    [UIView animateWithDuration:0.2
                     animations:^{
                         self.view.frame=self.view.window.bounds;
                     }];
    
    [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];

猜你喜欢

转载自longquan.iteye.com/blog/1735846
今日推荐