Xamarin.IOS Controlling the Screenshot in the iOS Multitasking Switcher

From WikiOD

In the App Programming Guide for iOS:

Remove sensitive information from views before moving to the background.

When an app transitions to the background, the system takes a snapshot of the app’s main window, which it then presents briefly when transitioning your app back to the foreground.

Remarks[edit | edit source]

Adapted from actual StackOverflow Question Controlling the Screenshot in the iOS7 Multitasking Switcher and answer Obj-c Answer

Show an Image for Snapshot[edit | edit source]

public override void DidEnterBackground(UIApplication application)
    //to add the background image in place of 'active' image
    var backgroundImage = new UIImageView();
    backgroundImage.Tag = 1234;
    backgroundImage.Image = UIImage.FromBundle("Background");
    backgroundImage.Frame = this.window.Frame;

public override void WillEnterForeground(UIApplication application)
    //remove 'background' image
    var backgroundView = this.window.ViewWithTag(1234);
    if(null != backgroundView)