ios - xcode navigationbar is not more visible after popover with button -


i have created popover in iphone view button inside segue viewcontroller. viewcontroller after popover have navigationbar not anymore.

my project structure:

  • navigationcontroller -> viewcontroller1 -> viewcontroller2(popover) ->viewcontroller3

all connections are: "show",except viewcontroller1 viewcontroller2: "present popover" if connect(show) directly viewcontroller1->viewcontroller3, fine...

where can problem?

i used tutorial: http://richardallen.me/2014/11/28/popovers.html

viewcontroller1:

func adaptivepresentationstyleforpresentationcontroller(controller: uipresentationcontroller) -> uimodalpresentationstyle {         return uimodalpresentationstyle.none     }  override func prepareforsegue(segue: uistoryboardsegue, sender: anyobject?) {         if segue.identifier == "popoveridentifier" {             let popoverviewcontroller = segue.destinationviewcontroller as!              popoverviewcontroller.modalpresentationstyle = uimodalpresentationstyle.viewcontroller2             popoverviewcontroller.popoverpresentationcontroller!.delegate = self         } } 

viewcontroller2 includes pickerview and:

override func prepareforsegue(segue: uistoryboardsegue, sender: anyobject?) {     if segue.identifier == "tovc3" {          var destviewcontroller : viewcontroller3 = segue.destinationviewcontroller as!viewcontroller3         destviewcontroller.passeduserid_target = selected_user     } } 

problem:

problem

i solved problem (temporarily) adding new navigationcontroller viewcontroller3 (editor->embedin->navigationcontroller) , add button buttom of layout.

the problem segue data vc1->vc3, solved defining global variable in vc3 , add action button (in vc2) assigning data these created global variables.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -