iOS开发Swift-UITableView-func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int

发布时间 2023-09-18 15:07:47作者: 临易
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 6
    }

返回一个整形.

作用:

UITableView的DataSource,用来确定cell的个数.numberOfRowsInSection就是在界面中的行数

例如: