【发布时间】:2015-03-18 20:05:17
【问题描述】:
我正在开发 Estimote iBeacons,并尝试在 Estimote SDK 和 Indoor location SDK 的帮助下创建一个演示应用程序。我正在使用室内定位 SDK 的演示应用程序,在这个演示应用程序中,我的代码有问题:
UIViewController *nextVC = [ESTIndoorLocationManager locationSetupControllerWithCompletion:^(ESTLocation *location, NSError *error) {
[weakSelf dismissViewControllerAnimated:YES completion:^{
if (location)
{
[[NSUserDefaults standardUserDefaults] setObject:[location toDictionary] forKey:LAST_CREATED_LOCATION_KEY];
ESTIndoorLocationViewController *navigationVC = [[ESTIndoorLocationViewController alloc] initWithLocation:location];
[weakSelf.navigationController pushViewController:navigationVC animated:YES];
}
}];
}];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:nextVC];
[self presentViewController:navController animated:YES completion:nil];
实际上我面临的问题是我得到 location 对象的价值是 nil 。而且我无法知道那里有什么问题。因为没有location 对象,我无法使用信标执行进一步的室内定位操作。
所以,请向我推荐任何适合此问题的解决方案。 谢谢。
【问题讨论】: