我能做什么:获取一个 100 lat 和 lng 点的 sqlite DB,然后将这些图钉放在地图上。看起来很棒!
我想做的是在绘制地图之前获取我的位置。但似乎:
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
总是在 (void)viewDidLoad 运行后触发。无论我在哪里插入它。
我需要做的是有一个启动画面,停在那里直到我得到一个位置,使用那个纬度和经度来搜索我的 sqlite DB 的位置在我这么多英里的范围内。
这是我的踪迹:
进入-[RootViewController initWithTabBar]
输入-[RootViewController viewDidLoad]
输入 -[RootViewController locationManager:didUpdateToLocation:fromLocation:]
这就是我真正想要的:
进入-[RootViewController initWithTabBar]
输入 -[RootViewController locationManager:didUpdateToLocation:fromLocation:]
输入-[RootViewController viewDidLoad]
现在我在想(使用tabbarcontroller),我是否必须以某种方式将它一直推回我的应用程序委托?冻结整个应用程序,直到我得到一个位置?这是我最近的想法。
感谢任何提示,线索,片段......!我一直在寻找几天,没有运气。
谢谢!!!!