navigationVC与scrollView的内容偏移解决,貌似还有,后续+

来源:互联网 发布:城市衣柜cevel淘宝店 编辑:程序博客网 时间:2024/05/01 05:04
关于多, 少64像素的问题:,应该可以解决

- (void)viewWillAppear:(BOOL)animated{
      [super viewWillAppear:animated];  
    if ( self.navigationController.navigationBarHidden == YES )
    {
        [self.view setBounds:CGRectMake(0, -20, self.view.bounds.size.width, self.view.bounds.size.height)];
    }
    else
    {
        self.edgesForExtendedLayout = UIRectEdgeNone;
    }

0 0