iPhone位置按钮

扫码查看
本文介绍了iPhone位置按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

雅知道地图应用程序的左下角的小按钮的位置?有谁知道在哪里可以找到?我看着UIButtonType和UITabBarSystemItem而是来到了一片空白。

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.

我preFER使用系统映像文件或一个系统的东西或 - 其他,以帮助确保与其他系统功能的一致性。

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

推荐答案

您可以尝试使用MKUserTrackingBarButtonItem它提供了相同的功能的地图应用程序的轨道按钮。下面是一些相同的code。

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];

这篇关于iPhone位置按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 04:15
查看更多