I know this is an old issue and had been answered in objective C. But i am looking for solution in Swift. My code for splitviewController in AppDelegate is as follows.
func splitViewController(splitViewController: UISplitViewController, collapseSecondaryViewController secondaryViewController:UIViewController!, ontoPrimaryViewController primaryViewController:UIViewController!) -> Bool {
if let secondaryAsNavController = secondaryViewController as? UINavigationController {
if let topAsDetailController = secondaryAsNavController.topViewController as? DocumentsViewController {
if topAsDetailController.tracksDocumentTableView == nil {
// Return true to indicate that we have handled the collapse by doing nothing; the secondary controller will be discarded.
return true
}
}
}
return false
}
i've got two views (MAster-Detail) as MasterViewController and DocumentViewConttoller. Is this a bug? or am i missing something? Thanks