Does WatchKit support html? is there is controller like UIWebview ?.
My client want to show webpage in a Apple Watch. is this possible ?
There is no webView in watchKit ,But i managed to convert HTML to formatted String
func convertHTMLToFormattedText ( htmlText : String , myLabel : WKInterfaceLabel) {
let attributeText: NSAttributedString?
if let htmlData = htmlText.dataUsingEncoding(NSUnicodeStringEncoding) {
do {
attributeText = try NSAttributedString(data: htmlData , options: [NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType], documentAttributes: nil)
myLabel.setAttributedText(attributeText)
}catch let e as NSError {
print("Couldn't translate \(htmlText): \(e.localizedDescription) ")
}
}
}