Closed quiKsilverItaly closed 8 years ago
Hi @quiKsilverItaly, sorry for the delay.
You can use the attributed text property of the title or subtitle label. You can show some HTML using the attributed text like that (this code use Swift 2.0):
var attrStr = try! NSAttributedString( data: "<b><i>text</i></b>".dataUsingEncoding(NSUnicodeStringEncoding, allowLossyConversion: true)!, options: [ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType], documentAttributes: nil) label.attributedText = attrStr
Let me know. -Paolo
I used
let alertVC = PMAlertController(title: "", description: "", image: nil, style: .Alert) alertVC.alertTitle.attributedText = attrStr
to put attrStr
into the PMAlertController. It works, thank you!
Hello,
I am looking for an AlertController, which can display a text like this: http://www2.pic-upload.de/img/31474056/bornscreen.jpg Headings with bigger font, usual text with smaller font, displaying URLs and so on. It's one big String with HTML-Code.
Can the description-attribute of PMAlertController also format a HTML-String? If yes, how?
Best regards