I need two images buttons inside a certain cell (not all cells), instead of the text. How can I do this? I have the ell extension, and I am putting stuff there, but I can’t seem to get the trigger working on the button like this:
class ChatCell: UITableViewCell
inside the init, I have tried to put a button with imageview, and tie it to a function fja()
but it doesn’t seem to work. What am I missing:
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
backgroundColor = .clear
selectionStyle = .none
addSubview(vwContainer)
addSubview(messageStatusImage)
let b = UIButton()
let i = UIImageView(image: UIImage(named: "fingerskate"))
b.addSubview(i)
//lblMessage.addSubview(b) I TRIED ALSO THIS
b.addTarget(self, action: #selector(fja), for: .touchUpInside)
vwContainer.addSubview(lblMessage)
vwContainer.addSubview(b)
}