从modal viewController中显示segue

时间:2017-03-29 03:53:31

标签: swift xcode uinavigationcontroller segue rootviewcontroller

我正在尝试从模式呈现的UITableViewController实现push / show segue。我能够从tableview中的一行执行push segue,但是它被延迟了。我知道它与导航层次结构堆栈有关,我尝试了很多东西,比如重置rootViewController,但没有任何运气......感谢您的帮助!

// present place tableViewController ---> modally
    func handleShowPlacesVC() {
        let vc = PlacesTableVC()
        let navigationController = UINavigationController(rootViewController: vc)
        present(navigationController, animated: true, completion: nil)
    } 


// show details tableViewController ---> push segue from tableview
    func handleShowCurrentUserPlaceDetailsVC() {
        let vc = CurrentUserPlaceDetailsVC()
        navigationController?.pushViewController(vc, animated: true)
    }

0 个答案:

没有答案