I have a few subclasses of UITableViewCell from the 2.0 days that override the deprecated designated initializer:
- (id)initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier
This code does some additional setup for the cell and I'm converting the classes to use the new designated intializer:
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
What's odd is that only place the compiler throws a warning about the method being deprecated is in the subclasses themselves when they call
[super initWithStyle:style reuseIdentifier:reuseIdentifier]
All the classes that use these subclasses don't get the warning. To try and force it, I added the following to the subclasses' headers:
- (id)initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier __attribute__ ((deprecated));
Oddly enough, now all deprecation warnings have gone away.
One thing I haven't tried is to convert the subclasses to override the new designated initializer and see if the places in the code that use these cells now get the deprecation warning from the super class.
I still find it odd that after I added the deprecated attribute, all warnings went away.
Any ideas why that would be?