diff --git a/JSONCreator_iOS/JSONCreator/MasterViewController.swift b/JSONCreator_iOS/JSONCreator/MasterViewController.swift index 110b2bd..2cfded2 100644 --- a/JSONCreator_iOS/JSONCreator/MasterViewController.swift +++ b/JSONCreator_iOS/JSONCreator/MasterViewController.swift @@ -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)