Center the MKMapView onto my location when pressing a button
来源:互联网 发布:java歌曲管理系统代码 编辑:程序博客网 时间:2024/06/05 08:11
You could just set map view user tracking mode to MKUserTrackingModeFollow. It would automatically set map center on user location.- (IBAction)centerMapOnUserButtonClicked:(id)sender { [self.mapView setUserTrackingMode:MKUserTrackingModeFollow animated:YES]; }
或者
[self.mapView setCenterCoordinate:self.mapView.userLocation.coordinate animated:YES];
0 0
- Center the MKMapView onto my location when pressing a button
- MKMapView center on user location
- app start after 5 seconds when pressing home button
- How to dismiss a DialogFragment when pressing outside the dialog? 怎么通过点击DialogFragment的外部透明隐藏它
- “Incorrect Architecture” when trying to install iPhone app onto my development device
- The “button-press-event” signal: button-press-event signal will be emitted when a button(typically f
- how to disable the button when submitting
- 错误日志——PreviousPage is null when attempting a cross-page postback using a button and the PostBack
- Simulate the pressing of keyboard keys
- download prerequisites from the same location as my application
- When the Blue night is over my face
- Reload the site when reached via browsers back button
- 7.3 Pinpointing the Location of a Device
- Scrolling a UITableView When Displaying the Keyboard
- Scrolling a UITableView When Displaying the Keyboard
- How to alignment the center position of the button in Android?
- Why did the size of my indexes expand when I rebuilt my indexes?
- get back onto the domain issue
- 最大公约数 最小公倍数
- Vim简明教程【CoolShell】
- 关于Android在线支付Alipay(支付宝)开发的经验分享
- 修饰符
- hadoop的hdfs文件常用命令操作
- Center the MKMapView onto my location when pressing a button
- maven依赖本地非repository中的jar包
- XCode的 Stack Trace,调试时抛出异常,定位到某一行代码
- 安装Was liberty之步骤
- Leftmost Digit(对数,数论)
- foj 2195 检查站点
- Ubuntu14.04安装中文输入法以及解决Gedit中文乱码问题
- linux 之 定时任务
- GPS车辆定位系统功能概述