Improving on iOS Multitasking
Remember when Apple launched multitasking with iOS 4? Man, that was awesome.

I remember thinking at the time that it was funny that they showed the apps that were running as icons instead of the apps themselves like webOS was doing back then. After reading the docs it made sense that they’d use icons because only the first few apps were truly running, and most apps were paused seconds after entering the background.
Then, a few years later, iOS 7 happened. With it came a shiny new app switcher that showed the apps off, not just their icons.

How’d they do this? Surely not all of these apps are running. Turns out it’s mostly just sleight of hand. Screenshots of the apps are taken by the OS shortly after being backgrounded, and it’s those screenshots that are shown in the switcher, not the actual running apps themselves.
There’s one big problem with this: those screenshots can and do become outdated. Here’s what you end up seeing for many apps when launched from the switcher:
- The app launches to a screenshot.
- Then it fades to the app’s default launch image.
- Apps that don’t restore state will then often show their own loading UI.
- Then, finally, content comes in. In many apps this content doesn’t match with the screen shot from the app switcher.

This experience is pretty jarring. It breaks the illusion that users have of how their phones work. Implementing Apple’s state restoration APIs can help, but those aren’t widely adopted.
So, that’s the case for apps that have been killed in the background and are cold starting. What’s funny is that you can get behavior like this for apps that are still alive and freshly backgrounded. Try this in any app
- Launch the app.
- Start scrolling.
- Background the app while it’s scrolling.
- Relaunch the app.
What you’ll see on launch is a snapshot captured at the time the app was closed that will cross fade into the (now scrolled down further) running app.

Every single app does this. Every. Single. App.

I came up with an idea to try to fix this, the logic goes something like this
- Detect when app is going to background.
- Find all scroll views.
- Stop them from scrolling.
Here’s the result, notice the app doesn’t flash old content on launch anymore.

It even does the right thing and doesn’t pause scrolling when entering the switcher.

I think this is a nice touch that improves users’ experiences with apps. I’m planning on shipping this in Opener, Close-up, and my other apps sometime in the near future. The source is available as a gist on Github here, try it out in your apps if you’d like to do the same!