I have structure like this
storyboard → myScene → myView → TableView
this is bind in my ViewController
's class like this
@IBOutlet weak var tableView: UITableView!
I also have a cell file
(xib) for my ShopHistoryCell
. This is added to Viewcontroller's TableView like this
self.tableView.delegate = self
self.tableView.dataSource = self
self.tableView.register(UINib(nibName: "ShopHistoryCell", bundle: nil), forCellReuseIdentifier: "ShopHistoryCell")
and called like this from TableView function
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "ShopHistoryCell", for: indexPath) as! ShopHistoryCell
cell.delegate = self
...
My cell file is just a boilerplate like this
class ShopHistoryCell: UITableViewCell {
...
Problem is that cell is fullscreen wide with no merging, no padding, no spaces between cells. I tried this approaches but these work for normal cell inside of tableview. Not working in my case
*my .xib
file is just a Table View cell
with Content View
inside