Difference between revisions of "SBSyncController"

From iPhone Development Wiki
Jump to: navigation, search
Line 1: Line 1:
### Kill all applications in switcher ###
+
= Kill all applications in switcher =
 
<code lang=objc">
 
<code lang=objc">
 
     [(SBSyncController *)[NSClassFromString(@"SBSyncController") sharedInstance] _killApplications];
 
     [(SBSyncController *)[NSClassFromString(@"SBSyncController") sharedInstance] _killApplications];

Revision as of 15:18, 27 February 2015

Kill all applications in switcher

   [(SBSyncController *)[NSClassFromString(@"SBSyncController") sharedInstance] _killApplications];
   //remove the identifiers from sbappswitchermodel
   if (IS_OS_7_OR_UNDER) {
      [[[NSClassFromString(@"SBAppSwitcherModel") sharedInstance] valueForKey:@"_recentDisplayIdentifiers"] removeAllObjects];
   }
   else { //iOS 8
      [[[NSClassFromString(@"SBAppSwitcherModel") sharedInstance] valueForKey:@"_recentDisplayLayouts"] removeAllObjects];
   }