如图所示,我想向表视图部分添加阴影。就像表视图有 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)