简体   繁体   中英

Possible to delay a segue?

I have an app with many segues built in the storyboard and I would like to delay them to show a quick animation on the clicked button.

Is it possible to delay a segue without using segueWithIdentifier ? Using segueWithIdentifier means to delete all segues in storyboard for recreating them in code => More code, more time to dev, more bugs possibilities, heavier app to run... It's not my favorite solution.

Does anyone know if it is possible to delay a segue while still using the segue between 2 VC in storyboard ?

Thanks all,

I agree with @Paulw11. Link your segues between view controllers, not from your button.

Then your IBAction method would invoke a UIView animation where the completion block invokes the segue.

And T_77's advice is terrible. Avoid sleep at all costs. It locks up the device. Bad, bad mojo.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM