Before using the battery doctor, found that it has a function: when the application into the background, will show another image overlay app switcher display interface.
The effect is as follows:
Become a---->
And such a feature, for the protection of user privacy is very useful.
This involves the use of background fetch. Of course, Background Fetch has more, more useful features,
Seethe IOS 7 learning: Background Fetch for multitasking
The following is an introduction to the background picture switch implementation.
1. program configuration background mode
The operation is as follows:
2. AppDelegate.h Add code:
@property (Strong, nonatomic) Uiimageview *splashview;
3.APPDELEGATE.M Add code:
appdelegate.m//fucktest////Created by Colin on 14-4-5.//Copyright (c) 2014 Icephone. All rights reserved.//#import "AppDelegate.h" @implementation appdelegate@synthesize splashview;-(BOOL) Application: ( UIApplication *) Application didfinishlaunchingwithoptions: (nsdictionary *) launchoptions{//Override point for Customi Zation after application launch. [Application Setminimumbackgroundfetchinterval:uiapplicationbackgroundfetchintervalminimum]; [Self.window makekeyandvisible]; Splashview = [[Uiimageview alloc]initwithframe:cgrectmake (0, 0, 320, 568)]; [Splashview setimage:[uiimage imagenamed:@ "Default-568h.png"]; return YES;} -(void) Application: (UIApplication *) application Performfetchwithcompletionhandler: (void (^) ( Uibackgroundfetchresult)) completionhandler{NSLog (@ "Backstage acquisition"); Completionhandler (uibackgroundfetchresultnewdata);} -(void) Applicationwillresignactive: (uiapplication *) application{//Sent when the application was about to move from aCtive to inactive state. This can occur for certain types of temporary interruptions (such as a incoming phone call or SMS message) or when the US Er quits the application and it begins the transition to the background state. Use the This method to the pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should with this method to pause the game.} -(void) Applicationdidenterbackground: (uiapplication *) application{[Self.window Addsubview:splashview]; [Self.window Bringsubviewtofront:splashview]; Use the This method to release the shared resources, save user data, invalidate timers, and store enough application state info Rmation to the restore your application to the it is terminated later. If your application supports background execution, this method is called instead of Applicationwillterminate:when the User quits.} -(void) Applicationwillenterforeground: (uiapplication *) application{[Self.splashview Removefromsuperview]; Called as part of the transition from the background to the inactive state; Here's can undo many of the changes made on entering the background.} -(void) Applicationdidbecomeactive: (uiapplication *) application{//Restart Any tasks this were paused (or not yet star Ted) While the application was inactive. If the application is previously in the background, optionally refresh the user interface.} -(void) Applicationwillterminate: (uiapplication *) application{//Called when the application was about to terminate. Save data if appropriate. See also Applicationdidenterbackground:.} @end