ios - UINavigation Bar not visible in animation of custom unwind segue -



ios - UINavigation Bar not visible in animation of custom unwind segue -

i using custom unwind segue in navigation controller, in animation of segue navigation bar not visible during animation, when animation ends navigation bar 'pops'. ¿how can retain visibility of navigation bar during animation?

more details:

i have button in navigation bar calls modal view animation performs expected, new view has button trigger unwind segue animation view grow , disappear, while animation performing navigation bar in destination view controller not visible until animation finished.

this code i'm using custom segue.

- (void) perform { uiviewcontroller *sourceviewcontroller = self.sourceviewcontroller; uiviewcontroller *destinationviewcontroller = self.destinationviewcontroller; [sourceviewcontroller.view.superview insertsubview:destinationviewcontroller.view atindex:0]; [destinoviewcontroller beginappearancetransition:yes animated:yes]; [uiview animatewithduration:0.2 delay:0.0 options:uiviewanimationoptioncurveeaseinout animations:^{ origenviewcontroller.view.transform = cgaffinetransformmakescale(1.5, 1.5); origenviewcontroller.view.alpha = 0.0; } completion:^(bool finished){ [destinationviewcontroller.view removefromsuperview]; [sourceviewcontroller dismissviewcontrolleranimated:no completion:null]; }]; }

ok, think got it, did inserting whole navigation controller view in superview of source view , removing code remove destination view superview , setting yes alternative of dismissviewcontrolleranimated this:

- (void) perform { uiviewcontroller *origenviewcontroller = self.sourceviewcontroller; uiviewcontroller *destinoviewcontroller = self.destinationviewcontroller; [origenviewcontroller.view.superview insertsubview:destinoviewcontroller.navigationcontroller.view atindex:0]; [uiview animatewithduration:0.4 delay:0.0 options:uiviewanimationoptioncurveeaseinout animations:^{ origenviewcontroller.view.transform = cgaffinetransformmakescale(2.0, 2.0); origenviewcontroller.view.alpha = 0.0; } completion:^(bool finished){ [origenviewcontroller dismissviewcontrolleranimated:yes completion:null]; }]; }

i'm still not sure if right way it.

you embed destinationviewcontroller in uinavigationcontroller , set segue sourceviewcontroller navigation controller.

ios objective-c animation segue uistoryboardsegue

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -