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

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -