I have a terms and condition(TOC) section on my app. What I want to achieve is to download the TOC from the internet and load it onto the screen for the user to use. Because I dont know any html/web stuff, what I am currently doing is putting all the text on my firebase with the following code to display in textView
DataService.ds.REF_TERMSOFSERVICE.observeEventType(.Value) { (snapshot: FIRDataSnapshot) in
if let termsOfService = snapshot.value as? String {
self.mainTextView.text = termsOfService
}
}
However, this method only displays the text as plain text without any formatting (New line, bold, font, font size).
I was wondering, is there a way to achieve what I want similar to image below where I can have some sort of formatting without doing some web/Html stuff? (At this stage I only know Swift)?