I am creating a tableview with a custom cell programmatically. I would like to utilise a stack view with arranged subviews within the custom cell. However, all my efforts have failed. Firstly is it possible to do this?
Secondly I am placing the code after:
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: "cellId")
I am using this code to create the stack view:
let thestack: UIStackView = {
let sv = UIStackView()
sv.distribution = .fillEqually
sv.axis = .vertical
sv.spacing = 8
return sv
}()
But I can't add the arranged subviews to this in addition to which after I addsubview(thestack) and list all the constraints - none of my data shows in the custom cell. Any help would be appreciated.