I created a table view with a custom prototype cell but I need to shape the borders, this is the image I have now
the one i get when i run the app
please note that I created a new class for the tableviewcell where I added a textfield to be changed from a list
I want to set the corners radius i tried to add this code,
layer.cornerRadius = 10
and
layer.masksToBounds = true
in the user defined runtime attributes like I did before for a button but it doesn't work
Here is the code:
import UIKit
class ListOffersViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {
let profil = ["Eric","Eric","Eric","Eric","Eric","Eric"]
public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return profil.count
}
public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! ListOffersViewControllerTableViewCell
cell.profilName.text = profil[indexPath.row]
return cell
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}