iOS 4.0之后NSDate的addTimeInterval方法被deprecated了
- (id)addTimeInterval:(NSTimeInterval)seconds
可以用dateByAddingTimeInterval来代替
- (id)dateByAddingTimeInterval:(NSTimeInterval)seconds;
iOS6.0中presentModalViewController过时了
self presentModalViewController:pNewController animated:YES];
替换为
[self presentViewController:pNewController animated:YES completion:nil];
iOS7.0中sizeWithFont过时了
CGFloat textSizeWidth = (self.textLabel != nil) ? [self.textLabel sizeWithFont:self.label.font constrainedToSize:maxLabelSize lineBreakMode:NSLineBreakByTruncatingTail].width : 0;
替换为
NSDictionary * tdic = [NSDictionary dictionaryWithObjectsAndKeys:self.label.font, NSFontAttributeName,nil];
CGFloat textSizeWidth =[self.textLabel boundingRectWithSize:maxLabelSize options:NSStringDrawingUsesLineFragmentOrigin |NSStringDrawingUsesFontLeading attributes:tdic context:nil].size.width;