ios - How do I spawn a pop over view controller programatically? -
my goal show view controller programmatically
current view controller
and then, if event gets called or something, (api, or websocket) want call these views programmatically
but want call last view controller first , supposed on top of first view controller
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
Post a Comment