iOS Navigationbar在pop时出现黑块怎么解决

一般会在次级页面重写viewWillAppear和viewWillDisappear,具体代码如下:

  • (void)viewWillAppear:(BOOL)animated
    {
    [super viewWillAppear:animated];
    [self.navigationController setNavigationBarHidden:YES animated:YES];
    }
  • (void)viewWillDisappear:(BOOL)animated
    {
    [super viewWillDisappear:animated];
    [self.navigationController setNavigationBarHidden:NO animated:YES];
    }

你可能感兴趣的:(iOS Navigationbar在pop时出现黑块怎么解决)