Watchkit Maps: show current location

不想你离开。 提交于 2019-12-24 11:22:41

问题


I have made application where we can calculate current location in extention app and I would like to show it at watch. How to do this? There is a methods only to show pin with different color.


回答1:


If you have the coordinates for the location you can use - (void)addAnnotation (CLLocationCoordinate2D)location withImage:(UIImage *)image centerOffset:(CGPoint)offset on WKInterfaceMap. Pass in the location for the first parameter and pass in a UIImage for the pin that you want to show for the current location. You will also want to be sure and call setVisibleMapRect so that the map shows the location.



来源:https://stackoverflow.com/questions/27425336/watchkit-maps-show-current-location

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!