PDA

View Full Version : "locate me" button




MarcVanH
Oct 14, 2008, 04:41 PM
Does anyone know if there is a system item for a "locate me" style button? I'm referring to the button in "Maps" lower left corner, with a radar scope type graphic that turns into an "activity indicator" when it is finding your location.

Do I need to create my own graphics to make one of these, or is there a built-in shortcut?



detz
Oct 14, 2008, 04:58 PM
I don't recall seeing one, just subclass the button and make your own

MarcVanH
Oct 14, 2008, 05:18 PM
Yes, I will. But I was mainly looking for that "scope" graphic.

ace2600
Oct 16, 2008, 12:46 AM
I needed the same thing about 6 weeks back, but no luck. If anyone knows of a package of standard iphone icons (free or paid) like the favorites image, refresh image, the location image, etc, I would greatly appreciate it.

Attached is the location button I made. I am by no means even close to a graphic designer, but this looks decent on a button on the phone.

Here's the code I used for the button:UIImage *buttonImage = [UIImage imageNamed:@"locate.png"];
UIBarButtonItem *locateButton = [[[UIBarButtonItem alloc] initWithImage:buttonImage style:UIBarButtonItemStyleBordered target:self action:@selector(startLocating:)] autorelease];
[[self navigationItem] setRightBarButtonItem:locateButton];

dejo
Oct 16, 2008, 01:12 AM
If anyone knows of a package of standard iphone icons (free or paid) like the favorites image, refresh image, the location image, etc,
The SDK provides access to many of these through UIBarButtonSystemItem and UITabBarSystemItem.
For example,
Favorites = UITabBarSystemItemFavorites
Refresh = UIBarButtonSystemItemRefresh
Location = sorry, not yet in SDK