ios - Pop from a view controller to an navigation controller -
i have 1 uiviewcontroller(login) , 1 navigationcontroller in storyboard , there 2 view controller included in navigationcontroller
the question how can pop loginviewcontroller 1 of view controller belongs navigationcontroller after user login (i need use code because need check if username correct or not) using swift
- make navigationcontroller initial view controller (tick checkbox on attributes inspector).
when app launched, present loginviewcontroller modal present modally segue, or programmatically
[self presentviewcontroller:loginviewcontroller animated:yes completion:nil]
after checked if username correct or not, dismiss loginviewcontroller calling loginviewcontroller
[self dismissviewcontrolleranimated:yes completion:nil]