ios - Sleep Command Not Working -


i have modal options on ipad app. when option selected want remove modal segue new screen.

i want original screen (that launched modal) seen 2 seconds before new segue happens. why code not work?

[self dismissmodalviewcontrolleranimated:yes]; sleep(2.0); [self performseguewithidentifier:@"normalpushsegue" sender:self]; 

this happens: when button on modal pressed freezes 2 seconds transitions extremely normalpushsegue screen. if put sleep command prepareforsegue still same thing.

any ideas? there other ways delay segue?

use performselector:afterdelay: instead:

[self performselector:@selector(performseguewithidentifier::) withobject:@"normalpushsegue" withobject:self afterdelay:2]; 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -