Reputation: 535
I am loading a local HTML string into a UIWebView but it is not justified.
How can I make my text justified ?
P.S. Don't mind the stupid text, it's for a comedy journal at my university.
EDIT 1: still not working
let justifiedArticleContent = "<p style=\"text-align:justify\"> \(editorialArticleContentThroughSegue) </p>"
editorialDetailWebView.loadHTMLString(justifiedArticleContent, baseURL: nil)
Upvotes: 0
Views: 1083
Reputation: 93161
You need to learn some CSS:
let htmlString = "<p style=\"text-align:justify\">As is the same with many students...</p>"
Upvotes: 1