我已经覆盖了moreNavigationController tableview,但是我想使用默认为nativeNavigationController的tableview数据源的相同行(tabbaritem图标,名称和徽章等).
我试图从现有的数据源中获取单元格.以下是我的代码片段:
我试图从现有的数据源中获取单元格.以下是我的代码片段:
func tabBarController(tabBarController: UITabBarController,shouldSelectViewController viewController: UIViewController) -> Bool { if (viewController == tabBarController.moreNavigationController && tabBarController.moreNavigationController.delegate == nil) { if tabBarController.moreNavigationController.topViewController?.view is UITableView { let view:UITableView = tabBarController.moreNavigationController.topViewController?.view as! UITableView tblDataSource = view.dataSource view.delegate = self view.dataSource = self } } return true } func tableView(tableView: UITableView,cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell:UITableViewCell = tblDataSource?.tableView(tableView,cellForRowAtIndexPath: indexPath) return cell }
但是,它显示了我的空白细胞.