I read rtf file with code:
NSURL *rtfString = [[NSBundle mainBundle]URLForResource:@"Privacy Policy Imaspanse" withExtension:@"rtf"];
NSError *error;
NSMutableAttributedString *stringWithRTFAttributes = [[NSMutableAttributedString alloc]initWithFileURL:rtfString options:@{NSDocumentTypeDocumentAttribute : NSRTFTextDocumentType} documentAttributes:nil error:&error];
if (error) {
NSLog(@"Error: %@", error.debugDescription);
} else {
self.textLabel.attributedText = stringWithRTFAttributes;
}
self.scrollView.contentSize = [stringWithRTFAttributes size];
Problem is that long line do not wraps to the next line. How can I achieve it? I need text that will be screen width and max height