简体   繁体   中英

Animating UiView even when the App is in Background

Is it possible to animate my UiView after an interval to come at the top of a screen even if the app is in background. I have been able to achieve this while the app is in foreground by adding my uiview as a subview to UiWindow. I am running a background thread too which shows that i am coming into that function where my uiview gets added into UiWindow but nothing shows when the app is in background. Is there any restriction on iOS level ?

From Apple docs: https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html#//apple_ref/doc/uid/TP40007072-CH4-SW8

Avoid updating your windows and views. Because your app's windows and views are not visible when your app is in the background, you should avoid updating them. The exception is in cases where you need to update the contents of a window prior to having a snapshot of your app taken.

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