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