Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone location button

Ya know the little location button in the lower-left corner of the Maps application? Does anybody know where I can find that? I looked in UIButtonType and UITabBarSystemItem but came up blank.

I'd prefer to use a system image or a system something-or-other, to help ensure consistency with other system functions.

like image 893
Phone Guy Avatar asked Jun 04 '09 02:06

Phone Guy


People also ask

Where is the location button on an iPhone?

Here's how: Go to Settings > Privacy, then select Location Services. Select an app, then turn Precise Location on or off.

Where is the location button in settings?

Open your phone's Settings app. Under "Personal," tap Location access. At the top of the screen, turn Access to my location on or off.

How do I make the location symbol go away on my iPhone?

Step 1: First, open the setting and go to the 'Privacy' option. Step 2: Then tap the 'Location Services' option. Step 3: Then scroll down to the list of app and then select 'System Services'. Step 4: Now you will see a list of system services on the screen and then scroll down and toggle of the 'Status bar' option.


2 Answers

Have a look at https://github.com/myell0w/MTLocation

Idle ModeSearching ModeReceiving Location Updates ModeReceiving Heading Updates Mode

I mimiced Google Maps' Locate Me - Button, including 4 different states and the animation that is done when switching between states.

like image 137
myell0w Avatar answered Oct 20 '22 21:10

myell0w


You can try using MKUserTrackingBarButtonItem It provides the same functionality as the track button on the Map app. Here is some same code.

MKUserTrackingBarButtonItem *trackButton = [[MKUserTrackingBarButtonItem alloc] initWithMapView:self.mapView];
NSMutableArray *items = [[NSMutableArray alloc] initWithArray:self.bottomToolbar.items];
[items insertObject:trackButton atIndex:0];
[self.bottomToolbar setItems:items];
like image 36
bickster Avatar answered Oct 20 '22 21:10

bickster