UITableView showing more rows than specified in numberOfRowsInSection:

后端 未结 9 1084
谎友^
谎友^ 2021-02-01 03:32

I want my tableView to show 6 rows with text in it, in this case \"Example.\" As far as I can tell, I have my numberOfSectionsInTableView: and numberOfRowsIn

9条回答
  •  情歌与酒
    2021-02-01 03:52

    Swift Version

    The easiest method is to set the tableFooterView property:

    override func viewDidLoad() {
        super.viewDidLoad()
        // This will remove extra separators from tableview
        self.tableView.tableFooterView = UIView(frame: CGRect.zero)
    }
    

提交回复
热议问题