I displayed the text in UILabel by using wrap method. Now I want to need to find the how many number of line is there in UILabel.
If there is any possible way to fi
sizeWithFont is deprecated in iOS 7, you may use this instead:
- (int)lineCountForText:(NSString *) text
{
UIFont *font = ...
CGRect rect = [text boundingRectWithSize:CGSizeMake(200, MAXFLOAT)
options:NSStringDrawingUsesLineFragmentOrigin
attributes:@{NSFontAttributeName : font}
context:nil];
return ceil(rect.size.height / font.lineHeight);
}