just like this
// SplitViewController
if let splitViewController = viewController as? UISplitViewController {
return self.topMost(of: splitViewController.viewController(for: .secondary))
}
or the topMost method will not return the right viewcontroller
just like this
or the
topMostmethod will not return the right viewcontroller