Adding image to navigation bar

后端 未结 9 2125
一个人的身影
一个人的身影 2020-12-23 02:09

I\'d like an image to take up all of a navigation bar. This is the navigation that comes with a navigation based app. It appears on the RootViewController with the accompa

9条回答
  •  死守一世寂寞
    2020-12-23 03:04

    Just add this line .

     [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"NavBar.png"] forBarMetrics:UIBarMetricsDefault];
    

    Bam! One line and done.

提交回复
热议问题