我想更改 More View Controller
的外观,它是在 TabBar
有很多选项卡时创建的。
到目前为止,我已经设法在 AppDelegate
中访问它并更改其 Navigation Bar
的外观。它看起来像这样:
但是,我似乎找不到访问和更改“moreNavigationController
”中显示的 TableViewController
的方法。
对我来说最好的方法是在不同的 Swift 文件中访问它,但是当我创建 UITabBarController
文件并尝试访问 UITableViewDataSource
时,它会弹出一个错误提示它不符合此协议(protocol)(这就是我在 Objective-C 中设法做到这一点的方式)。
如何访问 More View Controller
中的 Table View
?
最佳答案
Root View Controller 的 View 是您要查找的 UITableView
,因此这正是您访问它的方式:
UITableView* moreTableView=((UITableView*)[moreNavigationController.viewControllers objectAtIndex:0]).view;
关于swift - 在 Swift 中为更多 View Controller 自定义 TableView ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28793869/