SBCustomIcon is a MobileSubstrate-based extension that allows iPhone applications to easily change their icon in SpringBoard.
SBCustomIcon adds the following methods to the UIApplication class for customizing the app icon:
- (BOOL)hasCustomIcon;YES if the application currently has a custom icon, NO otherwise- (BOOL)setCustomIcon:(UIImage*)customIcon;YES on success, NO on failure- (BOOL)setCustomIconFile:(NSString*)customIconPath;YES on success, NO on failure- (void)removeCustomIcon;
The app will also need the following keys in it's Info.plist:
YES if your application uses SBCustomIcon functionalityYES
You can determine if SBCustomIcon is available before calling any of its methods with the SBCustomIconAvailable macro, or check if the methods exists with respondsToSelector:. Like that your application can work even if the extension isn't installed.
To use SBCustomIcon in your project, include this header file:
#import <UIKit/UIKit.h> #import <objc/runtime.h> #define SBCustomIconAvailable (class_respondsToSelector(objc_getClass("UIApplication"), @selector(hasCustomIcon))) @interface UIApplication (SBCustomIcon) - (BOOL)hasCustomIcon; - (BOOL)setCustomIcon:(UIImage*)customIcon; - (BOOL)setCustomIconFile:(NSString*)customIconPath; - (void)removeCustomIcon; @end
You can find SBCustomIcon in the BigBoss & Planet-iPhones repository in Cydia, or download the deb here and install it manually:
| SBCustomIcon | sbcustomicon-1.0.deb (13 KiB) | SHA1 c187a6663913cbf7746605376259d6813b748afa |
|---|
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.
You are free to use the functionality of SBCustomIcon in your own software.
The source code is provided as reference, but distribution of modified versions
is not allowed, since it could create conflicts.
svn checkout svn://vc.namedfork.net/namedfork/sbcustomicon/tags/1.0