Difference between revisions of "SBIcon"

From iPhone Development Wiki
Jump to: navigation, search
m (Launching an Application using SBIcon: Updated.)
Line 5: Line 5:
 
== Launching an Application using SBIcon ==
 
== Launching an Application using SBIcon ==
 
<source lang=objc>
 
<source lang=objc>
[icon launchFromLocation:4];
+
[icon launchFromLocation:iconLocation];
 
</source>
 
</source>
0 = Springboard/dock
+
 
4 = Spotlight
+
For SBIcon locations, see [http://iphonedevwiki.net/index.php/SBIconView#SBIconViewLocation here].
  
 
== Getting an SBIcon ==
 
== Getting an SBIcon ==

Revision as of 11:38, 12 March 2015

SBIcon is a class representing an icon displayed by SpringBoard. It is not typically used directly; instead, its various subclasses are used: SBApplicationIcon, SBBookmarkIcon, SBDownloadingIcon, and SBDestinationHole (which is a blank space used when rearranging icons).

In iOS 5 Apple split up SBIcon, creating a separate class for SBIconView, and just leaving SBIcon with behind the scenes stuff.

Launching an Application using SBIcon

[icon launchFromLocation:iconLocation];

For SBIcon locations, see here.

Getting an SBIcon

SBIconController *viewcont = [%c(SBIconController) sharedInstance];
SBIconModel *model = [cont model];
SBIcon *icon = [model expectedIconForDisplayIdentifier:identifier];

References