iphone - Performing code right before dismissing a partial curl through touching on the curl itself -
i'm using storyboards modal segue partial curl effect. input fields on bottom, if keyboard shown, necessary translate screen with:
[uiview beginanimations:nil context:null]; [uiview setanimationduration:0.25]; self.view.superview.center = cgpointmake(self.view.center.x, [[uiscreen mainscreen] bounds].size.height/2 - 200); [uiview commitanimations];
after job done, finishing ibaction undoes translation before dismissing modal view:
[uiview beginanimations:nil context:null]; [uiview setanimationduration:0.5]; self.view.superview.center = cgpointmake(self.view.center.x, [[uiscreen mainscreen] bounds].size.height/2); [uiview commitanimations]; ... [self dismissviewcontrolleranimated:yes completion:nil];
everything alright there remains following problem: user can touch opened curl dismiss view. if done while keyboard shown , therewith screen translated, screen flickers shortly , abnormal program behaviour result. either need deactivate click-on-curl-to-dismiss-the-view or have perform translation before curl dismisses. neither using textfieldshouldreturn
resign first responder nor performing translation in viewwilldisappear
/viewdiddisappear
(which should in theory performed right before dismiss?) have effect. has hint me?
create protocol
/ delegate
on destination modal view call presenting viewcontroller
translation handled once view dismisses in viewwilldisappear
method.
Comments
Post a Comment