I am working on an Iphone application and I need to display a large text. I need it to have a paragraph alignment. Please refer to the picture below for explanation.
I tried to use UILabel and UITextView but couldn't find the property to do it.
For ios > 7.1 just set textAligment property to NSTextAlignmentJustified , without any third-part libraries:
UILabel *label = [UILabel alloc] init];
label.textAligment = NSTextAlignmentJustified;
UITextView and UILabel they dont provide such alignment. You can use UIWebview instead.
You can use <p style="text-align:justify">Your text goes here.</p>
This might be helpful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With