uiviewcontroller - popToViewController with UITabBarViewController not working or not Calling -
nested pop animation can result in corrupted navigation bar
finishing navigation transition in unexpected state. navigation bar sub view tree might corrupted.
uitabbarcontroller(root) --> uinavigationviewcontroller --> uiviewcontroller(1) --> uiviewcontroller(2) --> uiviewcontroller(3)
i'm not connected viewcontrollers segue i'm pushing via code
above flow structure. when tab back-button on uiviewcontroller(3) need poptoviewcontroller uiviewcontroller(1)
override func willmove(toparentviewcontroller parent: uiviewcontroller?) { super.willmove(toparentviewcontroller: parent) if parent == nil { let controllers = self.navigationcontroller?.viewcontrollers vc in controllers! { if vc .iskind(of: uiviewcontroller(1).self) { self.navigationcontroller?.poptoviewcontroller(vc, animated: true) break } } } }
it's not working when above method executed it's showing black screen or time uiviewcontroller(1) not visible. doesn't know what's wrong
Comments
Post a Comment