在 Objective-C 中,如果我想要反转一个
BOOL
的值,这段代码会起作用吗,还是会将该 BOOL
的值设为 NO
?BOOL ab = YES;
ab = !ab; // would this reverse the BOOL, ab, and set it to NO?
if (ab == NO) {
ab = !ab; // would this reverse the BOOL again and set it to YES?
}