ios - custom segue top bar -
when creating custom segue 1 view controller another, there's problem showing top bar properly.
this code custom segue:
@implementation customsegue - (void)perform { uiviewcontroller *sourceviewcontroller = self.sourceviewcontroller; uiviewcontroller *destinationviewcontroller = self.destinationviewcontroller; [sourceviewcontroller.view addsubview:destinationviewcontroller.view]; destinationviewcontroller.view.alpha = 0.0; [uiview animatewithduration:0.5 delay:0.0 options:uiviewanimationoptioncurveeaseinout animations:^{ destinationviewcontroller.view.alpha = 1.0; } completion:^(bool finished){ [sourceviewcontroller presentviewcontroller:destinationviewcontroller animated:no completion:null]; [destinationviewcontroller.view removefromsuperview]; }]; } @end
i using storyboard set , sourceviewcotoller embeded in navigationviewcontroller.
after performing segue, there no top bar in th destinationviewcontroller. found answer should add navigation item destinationviewcontroller - doesn't help. way of dealing found embedding destinationviewcontroller in navigationviewcontroller. after doing this, top bar visible, during segue. it's because adding desitnationviewcontroller sourceviewcontroller, @ beginning of segue have 2 top bars visible 1 below another.
how deal ?
Comments
Post a Comment