George
unread,Dec 9, 2010, 12:19:45 PM12/9/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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.