Can't click the buttons inside a TableViewCell in iOS 14

Viewed 1443

In iOS 13 it works perfectly, but I am not able to make a simple tap on a button work within a TableViewCell. Is it happening to someone else? Has the way of doing this changed?

1 Answers

Solved!

You have to add your views to cell contentView like this:

contentView.addSubview(button)

and anchor your button to contentView:

button.topAnchor.constraint(equalTo: contentView.topAnchor).isActive = true
Related