A UITableViewCell defaults to the textLabel property. Now I have subclassed UITableViewCell and created my own text layout system that does not use textLabel . To reduce the likelihood of an error, I would like to make the default textLabel inaccessible to the compiler (autocomplete), and that if I try to access it outside the class, the code will not compile.
Running the readonly property will still allow me to access and change the properties of the label, so this will not work.
Is there any way to do this?
Edit:
So, the closest I still update the property in my subclass and condemn it:
@property (nonatomic) UILabel *textLabel NS_DEPRECATED_IOS(2_0, 3_0);
which currently gives me a warning if I try to access the property. But that doesnโt completely hide it from the compiler, and it also gives me the warning โAvailability does not match previous declarationโ.
source share