1
我的应用程序在启动时崩溃。请指点一下。非常感激。iOS:registerDefaults导致崩溃
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions
{
NSDictionary *temp = @{@(0): NSStringFromCGPoint(CGPointZero),
@(1): NSStringFromCGPoint(CGPointZero),
@(2): NSStringFromCGPoint(CGPointZero),
@(3): NSStringFromCGPoint(CGPointZero),
};
// Pro
NSDictionary *defaults = @{ // ... other PrefKeys
// No crash if I comment out this line
GMListVCOffsetsPrefKey:temp,
};
[[NSUserDefaults standardUserDefaults] registerDefaults: defaults];
}
你得到什么错误? – 2013-03-16 16:55:14