Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

objective c - How to stop/handle UI Operations in iOS when app moves to background state?

My app can be launched via UIApplicationLaunchOptionsLocalNotificationKey in the background. In that case the usual flow to setup initail view controller and some animations on the app's landing-page/first-page of the app take place.

My question is, Is this a good practice, If I leave these animations like this even when my app is launched via OS in background? Three things I am concerned about:

  1. Some animations are continuous, like a circular-dot(UIImage) expanding and shrinking, using CAAnimation.

  2. Some views are added and removed as subviews to the keyWindow, based on user location.

  3. When user taps the home button, do I need to stop the animations and subview additions then also?

Making the animation stop and resume via applicationDidEnterBackground and applicationWillEnterForeground seems tedious.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...