I am stuck with objective-c properties. What I need is to assign a write-only property for a variable, exactly the opposite of readonly, i.e the variable can have setMethod, but it should not have getMethod. I don’t know how to do it. answers with some code snippets are appreciated.
I am stuck with objective-c properties. What I need is to assign a write-only
Share
You can do something like:
Now you can access the variable
varlike a property that is write-only:And if you try to read the fake property the compiler will warning you.