Difference between revisions of "SBAppSwitcherModel"

From iPhone Development Wiki
Jump to: navigation, search
(Created page with "To get the list of recently opened apps (the list in the app switcher) iOS7 [[%c(SBAppSwitcherModel) sharedInstance] identifiers]; iOS8 %c(SBAppSwitcherModel) sharedInst...")
 
m
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
To get the list of recently opened apps (the list in the app switcher)
+
To get the list of recently opened apps (the list in the app switcher).
  
iOS7
+
== iOS 7 ==
  
 +
<source lang=objc>
 
[[%c(SBAppSwitcherModel) sharedInstance] identifiers];
 
[[%c(SBAppSwitcherModel) sharedInstance] identifiers];
 +
</source>
  
iOS8
+
== iOS 8 ==
  
 +
<source lang=objc>
 
[[%c(SBAppSwitcherModel) sharedInstance] snapshotOfFlattenedArrayOfAppIdentifiersWhichIsOnlyTemporary];
 
[[%c(SBAppSwitcherModel) sharedInstance] snapshotOfFlattenedArrayOfAppIdentifiersWhichIsOnlyTemporary];
 +
</source>
 +
 +
== Snapshot ==
 +
 +
<code>-(id)snapshot;</code> returns an NSArray of SBDisplayLayout as seen below
 +
<source lang="xml">
 +
<SBDisplayLayout: 0x170838540> {
 +
    SBDisplayLayoutDisplayItemsPlistKey =    (
 +
                {
 +
            SBDisplayItemDisplayIdentifierPlistKey = \"com.apple.Preferences\";
 +
            SBDisplayItemTypePlistKey = App;
 +
        }
 +
    );
 +
    SBDisplayLayoutSizePlistKey =    (
 +
        0
 +
    );
 +
},
 +
</source>
 +
 +
== References ==
 +
 +
{{occlass|library=SpringBoard.app|navbox=1}}

Latest revision as of 14:05, 11 August 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
    );
},

References