tmdvs/TDBadgedCell

sizeWithFont: deprecated

fulldecent opened this issue · 1 comments

In this code

CGSize numberSize;
if ([[[UIDevice currentDevice] systemVersion] compare:@"7.0" options:NSNumericSearch] != NSOrderedAscending) {
    numberSize = [self.badgeString sizeWithAttributes:@{ NSFontAttributeName:font }];
} else {
    numberSize = [self.badgeString sizeWithFont:font];
}

Even though iOS 7 is checked for and it uses the new API, the else case generates an undesirable compiler warning. Perhaps another approach may be prefered here.

Recommending #if here