I created a UITableView in swift, I know I can change the cell direction like this:
cell.textLabel?.textAlignment = NSTextAlignment.Right
But how can I do it to the section? and/or to the entire table?
I followed @ReyGonzales comment and implemented the following tableView:viewForHeaderInSection
:
override func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
var title: UILabel = UILabel()
title.text = "SomeText"
title.textAlignment = NSTextAlignment.Right
return title
}