【发布时间】:2015-02-19 17:38:13
【问题描述】:
我在 swift 上使用 TableView,我想知道如何将 UITableViewCell 标签设置为从 HTML 字符串生成。
我知道如何使用它在单元格标签上显示文本:
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as UITableViewCell
var articlesInSection = xmlParser.channelsArray[indexPath.section]["articles"] as [AnyObject]
//articleWebView.loadHTMLString(activeItem, baseURL: nil)
cell.textLabel?.text = articlesInSection[indexPath.row]["title"] as NSString
return cell
}
但我有一个我想要呈现的 HTML 而不是文本,类似于 loadHTMLString 函数
我该怎么做?
【问题讨论】:
标签: ios uitableview swift tableview tableviewcell