What happens to root view controller in ios / swift -


say switching viewcontrollers manually how transition new view controller code using swift

what happens (root) controller when viewcontroller brought front. can reinstantiate or should keep reference pu front?

no don't have re-instantiate it. can access current uiviewcontrollers uinavigationcontroller this

self.navigationcontroller?.viewcontrollers 

this return [uiviewcontroller]. if want viewcontroller @ index = 0. if want root can call

self.navigationcontroller?.poptorootviewcontrolleranimated(true) 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -