iphone - Dismiss Current View controller and open new view controller - ios Swift -
i have 3 view controllers. in second view controller. want dismiss current view controller , open third view controller. how can it? can dismiss third view controller second view controller using following code.
self.presentingviewcontroller?.presentingviewcontroller?.dismissviewcontrolleranimated(false, completion: nil)
my problem here when use function screen flickering. means second view controller showing , dismissed. how can it?
i want dissmiss currentview cotroller , open new view controller
it possible in android. hope possible in ios too. how can achieve this. please 1 me.
edit 1:
i try dissmiss current view controller , open new view controller using following code. second , third both closed.
self.dismissviewcontrolleranimated(false) { // go mainmenuview eyes of user presentingviewcontroller.dismissviewcontrolleranimated(false, completion: nil) }
i found solution
i change view controller child of navigation controller. , remove history third view controller following
let tempvca = self.navigationcontroller!.viewcontrollers tempvc: uiviewcontroller in tempvca { if (tempvc secondvc) { tempvc.removefromparentviewcontroller() } }
i using piece of code third view controller's viewdidload
func
Comments
Post a Comment