iPhone: Move UINavigationBar down?

后端 未结 2 920
感动是毒
感动是毒 2021-01-22 19:36

I\'m trying to position the navigation bar below the top of the screen.

I\'ve tried the following in viewWillAppear:

self.navigationControll         


        
2条回答
  •  遥遥无期
    2021-01-22 20:24

    Although late, I hope this can still help someone else out. I used Stephens code inside viewDidAppear:animated and the navigation bar stays put upon traveling back to the tab. This allowed me to use a logo above the navigation bar. I used this inside my viewController.

        - (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    self.navigationController.view.frame = CGRectMake(0.0, 100.0, 320.0, 426.0); 
    self.navigationController.navigationBar.frame = CGRectMake(0.0, 0.0, 320.0, 44.0); 
    [self loadData];
        }
    

提交回复
热议问题