`
zl4393753
  • 浏览: 332588 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
社区版块
存档分类
最新评论

add background image to UITableViewController in Navigation based app

 
阅读更多

It's a little different in a navigation based app: just change the background of the navigation view that each table view is sitting on. Placing the following code in viewDidLoad of each UITableViewController works:

    self.navigationController.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"myImage.png"]]; self.tableView.backgroundColor = [UIColor clearColor];

But you may only need to do it once, at the top level of the navigation controller, rather than in each tableview controller (although you'll still have to set each background to clear).
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics