Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save voznesenskym/6542fdc5be589f6ff77f to your computer and use it in GitHub Desktop.
Save voznesenskym/6542fdc5be589f6ff77f to your computer and use it in GitHub Desktop.
updated func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
var header = tableView.dequeueReusableCellWithIdentifier("userheader") as UserHeaderTableViewCell
header.delegate = self
var id = contactsManager.arrayOfArraysOfContacts[section][0].accountId
var account : Account? = AccountsManager.sharedInstance.allAccountsAsDictionaries[id!]
header.textLabel?.text = account!.name
header.textLabel?.textColor = UIColor.blackColor()
header.contentView.backgroundColor = UIColor.whiteColor()
return header
}
func didSelectUserHeaderTableViewCell(Selected: Bool, UserHeader: UserHeaderTableViewCell) {
println("Cell Selected!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment