ios - How do I spawn a pop over view controller programatically? -


my goal show view controller programmatically

current view controller

enter image description here

and then, if event gets called or something, (api, or websocket) want call these views programmatically

enter image description here

but want call last view controller first , supposed on top of first view controller

enter image description here

so technically last view have

transition cross dissolve presentation on current context 

how this?

as per requirement, can set storyboardid navigation controller.

on particular event instantiate navigation controller let storyboard = uistoryboard(name: "main", bundle: bundle.main) let mynavcontroller = storyboard.instantiateviewcontroller(withidentifier: "mystoryboardid") as? uinavigationcontroller

then present or show navigation controller

self.present(mynavcontroller, animated: true, completion: nil)

on viewdidload() method of first view controller perform segue popupviewcontroller.

now secondview show above first view controller. can dismiss view after using it.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -