Các bước:
- Tạo project, thêm
UITableViewvào Storyboard. - Tạo custom
UITableViewCellclass. - Kết nối
@IBOutlet, setdelegate,dataSource. - Implement
UITableViewDataSource,UITableViewDelegate. - Trong
viewDidLoadbo góc cho tableView:
tableView.layer.cornerRadius = 10
tableView.layer.backgroundColor = UIColor.cyan.cgColor
Chạy app: TableView hiển thị bo tròn góc 10pt, nền cyan.