Revised header logic to play along with the rest.
This commit is contained in:
parent
03fceaab5a
commit
6bff2e844d
@ -105,8 +105,10 @@ class MasterViewController: UIViewController, UITableViewDelegate, UITableViewDa
|
||||
|
||||
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
|
||||
|
||||
guard section == 0 else { return nil }
|
||||
|
||||
let button = UIButton(frame: .zero)
|
||||
button.setTitle("RequestView", for: .normal)
|
||||
button.setTitle((((sectionsMap as NSDictionary).allKeys[section]) as! String), for: .normal)
|
||||
button.backgroundColor = .red
|
||||
button.tag = section // why not... ``\__(~_~)__/``
|
||||
button.addTarget(self, action: #selector(requestJSON), for: .touchUpInside)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user