asynchronous - iPhone - Display smoothly 2 successive modal view controller -
i'm searching way able display 1 modal view controller after one, , make second appear while first disapearing.
the problem dismiss call done inside first modalviewcontroller applies both , secondcontroller never shown.
putting first dismiss before or after parent call not change anything. if first dismiss set wih animate= no, works fine. need animation.
i planned way, problem dismiss call done inside first modalviewcontroller applies both , secondcontroller never shown.
i don't understand why because each modal view has own navigationcontrollers, shouldn't collide.
i tried way showing second modal view nstimer after 0.5 sec, it's not satisfying : second appears when first has disapeared. not smooth @ all... if set delay less 0.5 sec, second modal view never shows up. , using such timer make not seem way of coding.
main.m
- (void) entry { firstcontroller *nextwindow = [[firstcontroller alloc] initwithnibname:@"thenib" bundle:nil]; nextwindow.caller = self; uinavigationcontroller* navcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:nextwindow]; [self.navigationcontroller presentmodalviewcontroller:navcontroller animated:yes]; [nextwindow release]; [navcontroller release]; } - (void) thingsdoneinfirstmodalcontroller:(object)returnvalue retval2:(object2)returnvalue2 { [self display2ndcontroller]; } - (void) display2ndcontroller { secondcontroller *nextwindow; nextwindow = [[secondcontroller alloc] initwithnibname:@"nib2" bundle:nil]; uinavigationcontroller* navcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:nextwindow]; [self.navigationcontroller presentmodalviewcontroller:navcontroller animated:yes]; [navcontroller release]; [nextwindow release]; }
1st modalviewcontroller.m
- (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath { [self.navigationcontroller dismissmodalviewcontrolleranimated:yes]; [self.caller thingsdoneinfirstmodalcontroller:theresult retval2:somemoreresult]; }
do know way make possible (make second view appears while first 1 disappearing), code example ?
thank you.
try creating dummy viewcontroller, , present second 1 using it.
Comments
Post a Comment