Code for
Uialertview *alert = [[Uialertview alloc]initwithtitle:@ "" message:@ " Thank you for the comments or suggestions you have made to us, Your support is the driving force of our progress! "delegate: Self cancelbuttontitle:@" I know. Otherbuttontitles:nil, nil]; [Alert show]; -(void) Alertview: (Uialertview *) Alertview Clickedbuttonatindex: (nsinteger) buttonindex{ if (buttonindex==0) { [self backforward]; }}
Effect
This is because Alertview animations and keyboard animations clash.
The solution is divided into two types
① with Uialertcontroller, suitable for iOS8 after
② If you still want to use Uialertview, then you can use the following methods
Alertview Show when write a main thread delay, pop also delay
uialertview *alert = [[Uialertview alloc]initwithtitle: @ " message:@" Thank you for your comments or suggestions, your support is the driving force of our progress! delegate : Self Cancelbuttontitle:@ " I got it. " Otherbuttontitles:nil, nil];d Ispatch_after (Dispatch_time (dispatch_time_ Now, (int64_t) ( 0.4f * nsec_per_sec), Dispatch_get_main_queue (), ^{[alert show];
-(void) Alertview: (Uialertview *) Alertview Clickedbuttonatindex: (nsinteger) buttonindex{ if (buttonindex==0) { [self performselector: @selector (Backforward) withobject:nil Afterdelay: 0.25f ]; }}
Okay, here's the effect.
iOS8 after the use of UIALERTVIW when Pop/push page, the keyboard flash a problem