Skip to content

Instantly share code, notes, and snippets.

@jpotts18
Last active August 29, 2015 14:08
Show Gist options
  • Save jpotts18/39d30b8d1ad7096564c8 to your computer and use it in GitHub Desktop.
Save jpotts18/39d30b8d1ad7096564c8 to your computer and use it in GitHub Desktop.
let HEADERS:[String] = [
"FULL NAME",
"USERNAME",
"PASSWORD",
"DOB",
"ZIPCODE",
"PHONE NUMBER"
]
let ROWS:[UITableViewCell] = [
FullNameCell(),
UITableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: nil)!,
UITableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: nil)!,
UITableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: nil)!,
UITableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: nil)!
]
// later
override func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
var label:PingoUILabel = PingoUILabel()
let container:UIView = UIView()
container.addSubview(label)
styleLabel(label, text: HEADERS[section], fontType: .ProfileLabel, textColor: UIColor.pingoMediumGrayBaseColor())
addLabelConstraints(label)
return container
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment