作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
如何在 CLLocation 管理器中围绕监控区域绘制圆圈。我想在没有 map 的情况下在我在 CoreLocation 中通过的区域周围绘制圆圈。
CLRegion *region = [[CLRegion alloc] initCircularRegionWithCenter:point radius:100 identifier:@"Some Location"];
最佳答案
CoreLocation 与绘图或 UI 没有任何关系。当你说你想画一个“我在没有 map 的 CoreLocation 中经过的区域周围的圆”时,我不明白你的意思 - 如果你不想在 map 上画它,你想画什么?如果它只是一个普通的 UI View ,那么您需要想出一个合适的坐标空间,适本地转换您的 CLRegion
,然后使用 CoreGraphics 绘制您的圆 - 这应该相当简单。
关于iphone - 如何在 iPhone 中为 CLRegion 设置颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16477494/
我是一名优秀的程序员,十分优秀!