sizeWithFont: deprecated
fulldecent opened this issue · 1 comments
fulldecent commented
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.
fulldecent commented
Recommending #if
here