Difference between revisions of "SBAppSwitcherModel"

From iPhone Development Wiki
Jump to: navigation, search
(Snapshot)
Line 17: Line 17:
 
== Snapshot ==
 
== Snapshot ==
 
-(id)snapshot; returns an NSArray of SBDisplayLayout as seen below
 
-(id)snapshot; returns an NSArray of SBDisplayLayout as seen below
<source>
+
<source lang="objc">
 
"<SBDisplayLayout: 0x170838540> {
 
"<SBDisplayLayout: 0x170838540> {
 
     SBDisplayLayoutDisplayItemsPlistKey =    (
 
     SBDisplayLayoutDisplayItemsPlistKey =    (

Revision as of 02:05, 6 January 2015

To get the list of recently opened apps (the list in the app switcher).

iOS 7

[[%c(SBAppSwitcherModel) sharedInstance] identifiers];

iOS 8

[[%c(SBAppSwitcherModel) sharedInstance] snapshotOfFlattenedArrayOfAppIdentifiersWhichIsOnlyTemporary];


Snapshot

-(id)snapshot; returns an NSArray of SBDisplayLayout as seen below

"<SBDisplayLayout: 0x170838540> {
    SBDisplayLayoutDisplayItemsPlistKey =     (
                {
            SBDisplayItemDisplayIdentifierPlistKey = \"com.apple.Preferences\";
            SBDisplayItemTypePlistKey = App;
        }
    );
    SBDisplayLayoutSizePlistKey =     (
        0
    );
}",