在我的willDisplayHeaderView方法中,我改变了分组表头的颜色,但我想在分组标题前添加一张图片。求助? 我的willDisplayHeaderView代码是:
func tableView(tableView: UITableView, willDisplayHeaderView view: UIView, forSection section: Int) {
let header: UITableViewHeaderFooterView = view as UITableViewHeaderFooterView
header.contentView.backgroundColor = UIColor(red: 238/255, green: 168/255, blue: 15/255, alpha: 0.8)
header.textLabel.textColor = UIColor.whiteColor()
header.alpha = 1
}
var myCustomView: UIImageView = UIimageView()
,一个错误就会消失。 - shripad20