My App is too old. Now, I want to update with latest IOS. My Deployment Target is 6.0 but when I change my Deployment Target 6.0 to 7.1. My app throws too many warnings. and this is one of them :
'sizeWithFont:constrainedToSize:lineBreakMode:' is deprecated: first deprecated in iOS 7.0 - Use -boundingRectWithSize:options:attributes:context:
The warning occur in this line:
CGSize expectedLength = [str sizeWithFont:str.font constrainedToSize:max lineBreakMode:str.lineBreakMode];
I will try with this code. but I don't know how to add line break mode. Please check:
CGSize mysize = [str sizeWithAttributes:@{NSFontAttributeName: str.font}];
I already checked in StackOverflow. but I am not satisfied with checked answers because of lineBreakMode.
May be I missed some of good answers. Also tell me the StackOverflow link which will help me.
Thanks in Advance.