I'm creating a static Getting Started Guide using a UITextView in Interface Builder using .Xib files.
I've added a bunch of formatted text onto here and it looks fine in Interface Builder:
However when I run it on my iPhone or Simulator I see this:
Fonts have been added to the plist:
Why is the text not being displayed as I expected it would?
Not able to get the UITextView to work so I decided to solve it like this (using a UIWebView and hosting a HTML formatted webpage):
override func viewDidLoad() {
super.viewDidLoad()
webView.opaque = false;
webView.backgroundColor = UIColor.clearColor();
let url = NSURL (string: "https://mysecreturl.com");
let requestObj = NSURLRequest(URL: url!);
webView.loadRequest(requestObj);
}
Not ideal but it works for now.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.