I don't understand why I can't set the title of my UIButton
. It crashes here:
func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
if(section == 0) {
let view = UIView()
view.alpha = 0
return kTableHeaderShouldStickToTop ? view : carouselViewController.view
} else {
let cell = tableView.dequeueReusableCellWithIdentifier("NewsFeedSectionHeaderCell") as! NewsFeedSectionHeaderCell
cell.delegate = self
cell.dataSource = self
cell.followingButton.setTitle("test", forState: .Normal)
return cell
}
}
It is connected in my .xib
file: