UISplitViewController - Bottom Grey Bar

30 views Asked by At

I know this is a big debated topic, but I couldn't find a successful answer to my problem. Since I've tried most of all of the solutions people posted.

I have a TabBar, that as a button "Account". Here the UISplitViewController, starts is job. I put it, as double column, left column the "Account" Tab menu, and the right column, the selected column, opened. My problem is, which is the most common, When I open on iPAD, it all works great. But When on iPhone (compact) it has the Grey Bar at the bottom of the screen...

My Account Menu code is:

let splitVC = BaseSplitViewController()
splitVC.extendedLayoutIncludesOpaqueBars = true

let secondaryVC = UINavigationController(rootViewController: UIViewController())
secondaryVC.view.backgroundColor = .background

let accountViewController = AccountViewController(viewModel: AccountViewModel.Factory().create())
let navController = UINavigationController(rootViewController: accountViewController)
splitVC.tabBarItem = UITabBarItem(
  title: TabBarItemTag.title(for: TabBarItemTag.account.rawValue),
  image: UIImage(named: "AccountTab"),
  tag: TabBarItemTag.account.rawValue)
accountViewController.title = TabBarItemTag.title(for: TabBarItemTag.account.rawValue)


splitVC.viewControllers = [
  navController,
  secondaryVC
]

return splitVC

And My OnClick code, to open the selected column is:

let viewController = MoreViewController()

      // configure navController
      let navigationController = UINavigationController(rootViewController: viewController)
      navigationController.modalPresentationStyle = .formSheetPadFullScreenPhone
      if #available(iOS 13.0, *) {
        navigationController.isModalInPresentation = true // available in IOS13
      }

     self.splitViewController?.showDetailViewController(navigationController, sender: "")

Hope someone can help me, since I'm on this for quite some days. I have tried OpaqueBars, TraitCollection and didn't have any fix.

Thanks! Any question feel free to ask.

0

There are 0 answers