ios - Push more than 3 ViewController in NavigationController from AppDelegate App crash -


i working on push notification. when application raise device , when tap on it. want push 3 viewcontroller navigation stack.

so using below code this.

appdelegate.cs code

window = new uiwindow(uiscreen.mainscreen.bounds); menu = new slideoutnavigationcontroller();  var storyboard = uistoryboard.fromname("main", null); var webcontroller = storyboard.instantiateviewcontroller("dashboardviewcontroller") dashboardviewcontroller;  menu.mainviewcontroller = new mainnavigationcontroller(webcontroller, menu); menu.menuviewcontroller = new menunavigationcontroller(new dummycontrollerleft(), menu) { navigationbarhidden = false };  window.rootviewcontroller = menu; window.makekeyandvisible();  var storyboarddd = uistoryboard.fromname("main", null); var webcontrollerdd = storyboarddd.instantiateviewcontroller("dashboardviewcontroller") dashboardviewcontroller; webcontrollerdd.reloadnotication();  uinavigationcontroller nav = webcontroller.navigationcontroller; var notifywebcontroller = storyboard.instantiateviewcontroller("notificationlistviewcontroller") notificationlistviewcontroller; notifywebcontroller.navigationcontoller = nav; nav.pushviewcontroller(notifywebcontroller, true);  if (type.equals("damage report")) {     var webcontroller2 = storyboard.instantiateviewcontroller("damagereportviewcontroller") damagereportviewcontroller;     webcontroller2.damagereportid = id;     webcontroller2.navigationcontoller = nav;     nav.pushviewcontroller(webcontroller2, true); } if (type.equals("overloss")) {     var webcontroller2 = storyboard.instantiateviewcontroller("overlossviewcontroller") overlossviewcontroller;     webcontroller2.packetid = id;     webcontroller2.navigationcontoller = nav;     nav.pushviewcontroller(webcontroller2, true); } 

the upper code working fine open specific viewcontroller.

but app crash after crash log.

crash report :

2017-07-26 15:25:18.330 aastha.ios[6357:2021514] nested push animation can result in corrupted navigation bar 2017-07-26 15:25:18.740 aastha.ios[6357:2021514] finishing navigation transition in unexpected state. navigation bar subview tree might corrupted. 

my solution :

when search on google , says open viewcontroller 1 after each viewcontroller viewdidappear method not sure if correct way.

any appreciated.

you can't push more 1 view controller animation. if want user see transtions -> b -> c indeed have in a's , b's viewdidappear method.

if want user see last view controller c , able go through , b, can push them @ once, need without animation:

nav.pushviewcontroller(webcontroller2, false); 

another option use setviewcontrollers this:

nav.setviewcontrollers([a, b, c], true); 

this push 3 view controllers @ same time , topmost 1 animated using push transition. don't think fits situation, adding here completeness sake.


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -