UITabBarController自动生成的自定义tableview

Custom tableview automatically generated by UITabBarController

我需要访问扩展 UITabeBarController 的主 class 中超过 5 个标签栏(出现 tabBarItem "more" 的地方)时自动生成的 tableview 实例。我想稍微自定义 tableview 如何删除分隔线 (tableView.separatorStyle = .none)。

谢谢

Swift

    let tab = UITabBarController()
    if let viewController = tab.moreNavigationController.viewControllers.first as? UIViewController, let tableview = viewController.view as? UITableView {
        tableview.separatorStyle = .none
    }

ObjC

    UITabBarController *tab = [UITabBarController new];
    UIViewController *vc = [tab.moreNavigationController.viewControllers firstObject];
    if ([vc.view isKindOfClass:[UITableView class]]) {
        [(UITableView *)vc.view setSeparatorStyle:UITableViewCellSeparatorStyleNone];
    }