Setting a background image for LocalFaves

0 views
Skip to first unread message

George

unread,
Dec 9, 2010, 12:19:45 PM12/9/10
to Skyhook Local Faves
A lot of developers have asked me how to set a background image in LF
screens, so here goes:

To instantiate LF you pass in a dictionary of settings. The bare
minimum is your developer Id and application key, like so:

NSDictionary *settings = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithUnsignedInt:my_app_id], kLFSettingsAppId,
my_dev_key, kLFSettingsDevKey,
nil];
LocalFaves *lf = [LocalFaves
initializeLocalFavesWithSettings:settings];


To add a background color, you simply pass a UIColor object for the
kLFSettingsBackgroundColor key like so:

NSDictionary *settings = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithUnsignedInt:my_app_id], kLFSettingsAppId,
my_dev_key, kLFSettingsDevKey,

my_color_object, kLFSettingsBackgroundColor,
nil];


To set a background *image* you simply pass a UIColor object as usual,
but create the object with the
+ (UIColor *)colorWithPatternImage: constructor.
Reply all
Reply to author
Forward
0 new messages