注意BOOL是不能直接存放在NSMutableArray中的
NSNumber* yesObj = [NSNumber numberWithBool:YES]; NSMutableArray* arr = [[NSMutableArray alloc] initWithObjects: yesObj, yesObj, yesObj, yesObj, nil]; NSLog(@"%d", [[arr objectAtIndex:1] boolValue]);
注意BOOL是不能直接存放在NSMutableArray中的
NSNumber* yesObj = [NSNumber numberWithBool:YES]; NSMutableArray* arr = [[NSMutableArray alloc] initWithObjects: yesObj, yesObj, yesObj, yesObj, nil]; NSLog(@"%d", [[arr objectAtIndex:1] boolValue]);