ios - Show segue inexplicably changes to a modal segue when a container view controller is used -


i don't know exact cause of guessing has container view controller being used. using several containers, 1 swrevealviewcontroller, houses generic uiviewcontroller rearviewcontroller , uinavigationcontroller frontviewcontroller. root view controller of navigation controller container view controller, mainviewcontroller, contains uipageviewcontroller. page view controller has 3 uitableviewcontrollers , when try navigate table view controllers relevant view controllers (via segue), , want push transition, makes modal transition gives?

it hierarchy guess, kinda messed these view controllers right , think broke brain @ point. appreciate if knows wrong can explain.

was stuck same problem , tried solve 2 days, , solved that..

view hierarchy:

container view

  • first controller (direct child of container)
  • second controller (direct child of container)
    • third controller
    • fourth controller

solution

  • added navigation controller first controller
  • added navigation controller second controller

and when want display controller instead of presenting controller present uinavigationcontroller, solve problem of not happening segue push animation...

sample code, hoping help:

import uikit  class viewcontroller: uiviewcontroller {      var loginviewnavigation  : uinavigationcontroller!     var singupviewnavigation : uinavigationcontroller!      override func viewdidload() {         super.viewdidload()          var storyboard = uistoryboard(name: "user", bundle: nil)          loginviewnavigation  = storyboard.instantiateviewcontrollerwithidentifier("loginviewnavigation") as! uinavigationcontroller         singupviewnavigation = storyboard.instantiateviewcontrollerwithidentifier("signupviewnavigation") as! uinavigationcontroller          self.addchildviewcontroller(loginviewnavigation)         self.addchildviewcontroller(singupviewnavigation)          self.view.addsubview(loginviewnavigation.view)     } } 

point observe use uinavigationcontroller of controller want display instead of viewcontroller


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -