![enter image description here](https://i.stack.imgur.com/YR1mz.png)
Я взял заголовок раздела UITableview и другую ячейку для отображения содержимого, но когда дело доходит до углового радиуса, как мы можем добиться такого расположения без каких-либо проблем.
Я пытался указать угловой радиус заголовка таблицы для topLeft, topRight и последней ячейки bottomLeft, bottomRight, но у меня это не сработало.
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
guard let headerView = tableView.dequeueReusableCell(withIdentifier: "headerCell") as? headerCell else { return UIView() }
headerView.labelTaskName.text = arrayTaskLists[section].first?.outcome_title
headerView.viewContainerHeader.roundCorners([.topRight,.topLeft], radius: 10.0)
headerView.viewContainerHeader.layoutSubviews()
headerView.btnHeaderViewCell.tag = section
headerView.delegate = self
return headerView
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 44
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: CellIdentifier.TaskInformationCell) as! TaskInformationCell
cell.infoView.roundCorners([.bottomLeft,.bottomRight], radius: 10.0)
cell.infoView.layoutSubviews()
}
Спасибо за вашу помощь.