小编Adi*_*rma的帖子

为分组表视图中的每个部分添加阴影

如图所示,我想向表视图部分添加阴影。就像表视图有 4 个部分一样,表视图中也会有 4 个阴影视图。

func numberOfSections(in tableView: UITableView) -> Int { return 3 }

func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
    return 3
}

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    switch processIndex {
        return cell
}

func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
    return  44
}

func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
        return UIView
}

func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { …
Run Code Online (Sandbox Code Playgroud)

uitableview ios swift swift3

8
推荐指数
2
解决办法
7451
查看次数

标签 统计

ios ×1

swift ×1

swift3 ×1

uitableview ×1