小编kok*_*uch的帖子

va_list在64位模拟器上崩溃

使用64位iOS模拟器时,下面的init函数崩溃,出现EXC_BAD_ACCESS(code = 1)错误.谁会知道为什么?以及如何正确地解决它.

有关信息:'format'不是零,它可以在32位模拟器和任何32/64位iPhone/iPad设备上正常工作.

void Log (NSString * format, ...)
{
   va_list argList;
   va_start(argList, format);
   NSLogv(format, argList);
   NSString* string = [[NSString alloc] initWithFormat: format arguments: argList];
   va_end(argList);

...
}
Run Code Online (Sandbox Code Playgroud)

在AppDelegate中称为第一件事

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
   Log(@"app options %@", launchOptions);
   ...
}
Run Code Online (Sandbox Code Playgroud)

64-bit exc-bad-access nsstring ios ios-simulator

8
推荐指数
1
解决办法
2067
查看次数

pausesLocationUpdatesAutomatically [CLLocationManager]后重新启动locationUpates

我想知道iOS系统是否在pausesLocationUpdatesAutomatically属性自动暂停后自动重启CLLocationManager的locationUpdates,或者我是否必须自己处理这个案例.

如果是,根据哪些规则,如果不知道如何知道我再次开始移动并应重新启动locationUpdates?

iphone gps core-location cllocationmanager ios

4
推荐指数
1
解决办法
4400
查看次数