Search code examples
objective-csyntaxdeclared-property

Inverting a BOOL property without using dot syntax


In this line of code I am reversing a BOOL value:

 someObject.boolValue = ![someObject boolValue];

How can I rewrite this line in "pure" Objective-C syntax, without dot syntax?


Solution

  • [someObject setBoolValue:![someObject boolValue]];