简体   繁体   中英

iOS Launch Screen Cuts into Splash Animation

I have a splash animation that is being cut into for the first ~0.4 seconds by the launch screen. I do not want to remove the launch screen. I was wondering if I could set the splash animation to play only after the launch screen closes. I would rather not hardcode a delay of 0.4 seconds if possible, as it feels like a hack.

Yes you can. The best place to do so is in your main view controller's viewWillAppear method. You can put a trigger in there or launch the animation directly. Hardcoding a delay is indeed not a good idea because besides device configuration like processor speed etc there are a lot of other contributing factors to the time the launch screen takes.

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