Breaking News
Loading...
Tuesday, May 14, 2013

Running iOS App In The Background

5:06 AM

if you want run iOS app functionality in background mean,please copy the below code and paste into appDelegate class.

- (void)applicationDidEnterBackground:(UIApplication *)application
{
    if ([[UIDevice currentDevice] isMultitaskingSupported])
    {
        //Check if device supports mulitasking
        UIBackgroundTaskIdentifier bgTask;
        UIApplication  *app = [UIApplication sharedApplication];
        bgTask = [app beginBackgroundTaskWithExpirationHandler:^{
            [app endBackgroundTask:bgTask];
        }];
    }
}

0 comments:

 
Toggle Footer