m (→Launching an Application using SBIcon: Updated.) |
m (→Getting an SBIcon: typo.) |
||
Line 12: | Line 12: | ||
== Getting an SBIcon == | == Getting an SBIcon == | ||
<source lang=objc> | <source lang=objc> | ||
SBIconController * | SBIconController *controller = [%c(SBIconController) sharedInstance]; | ||
SBIconModel *model = [ | SBIconModel *model = [controller model]; | ||
SBIcon *icon = [model expectedIconForDisplayIdentifier: | SBIcon *icon = [model expectedIconForDisplayIdentifier:iconIdentifier]; | ||
</source> | </source> | ||
== References == | == References == | ||
{{IPFHeader|SpringBoard|.app}} | {{IPFHeader|SpringBoard|.app}} |
Revision as of 11:39, 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 *controller = [%c(SBIconController) sharedInstance];
SBIconModel *model = [controller model];
SBIcon *icon = [model expectedIconForDisplayIdentifier:iconIdentifier];
References