当我试图从字典中获取BOOL时,我得到:
BOOL isTrue = [someDict objectForKey: @"isTrue"];
Run Code Online (Sandbox Code Playgroud)
我明白了:
Initialization makes integer from pointer without a cast
Run Code Online (Sandbox Code Playgroud)
我通过这样设置字典:
self.someDict = [[NSMutableDictionary alloc]
initWithObjectsAndKeys:
self.isTrue, @"isTrue",
nil];
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
objective-c ×1