Objective C Boolean Array

前端 未结 6 986
北恋
北恋 2020-12-08 18:54

I need to utilize an array of booleans in objective-c. I\'ve got it mostly set up, but the compiler throws a warning at the following statement:

[updated_use         


        
6条回答
  •  独厮守ぢ
    2020-12-08 19:34

    From XCode 4.4 you can use Objective-C literals.

    [updated_users replaceObjectAtIndex:index withObject:@YES];

    Where @YES is equivalent of [NSNumber numberWithBool:YES]

提交回复
热议问题