Reputation: 23
I realize this is probably a simple solution but I've been looking around I can't seem to figure this out.
[self.flag TRUE];
flag is of type BOOL the problem is with the "TRUE" I'm unsure what to put to assign it to flag and I've tried a number of different combinations.
Upvotes: 1
Views: 6908
Reputation: 15015
Even in square bracket also you can try like this:-
[self setFlag:YES];
Upvotes: 0
Reputation: 62052
self.flag = YES;
If you use [self.flag TRUE];
you're trying to call a method named TRUE
on self.flag
...
True Objective-C uses YES
and NO
for BOOL
, but XCode knows what to do with TRUE
and FALSE
. The biggest problem was the square bracket thing you were trying to do. self.flag = TRUE
would work.
Upvotes: 1