0
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:@"Please, other format selected.", NSLocalizedDescriptionKey, @"This format is not available.", NSLocalizedFailureReasonErrorKey, @"The operation couldn't be completed.", NSUnderlyingErrorKey, self.URL, NSURLErrorKey, nil];
NSLog(@"dict:%@", dict); // no Crash
NSError *error = [NSError errorWithDomain:@"testError" code:1 userInfo:dict];// crash
为什么在分配错误对象时崩溃?当我分配NSError userInfo来设置NSDictionary时,为什么我的应用崩溃了?
这里有崩溃的细节:
+[__NSCFConstantString objectForKey:]: unrecognized selector sent to class 0x3ebf5550
真诚地,谢谢你的亲切回答。 – 2012-04-05 01:51:18