Re: Mystery Buttons in UITableViews


Alex Zavatone
 

Did you prepare the cells for reuse?

Run the app in the simulator and enable the highlight for the views. I’ll bet that as soon as you scroll the table view, some cells are getting ghost buttons appearing in them.

It that what’s happening?

On Sep 26, 2018, at 8:58 PM, Gerriet M. Denkmann <g@...> wrote:

iOS 12, Xcode 10.

I have two subclasses of UITableViewController, and the tableView of each has a row with a UIButton.
Both subclasses look absolutely identical (I have checked this in Xcode at least a dozen times) but still:
• One button works as expected,
• but the other one does not react to tappings at all (not dims for a short time, not sends its action methods). And yes: it has valid targets and methods. Doing sendActionOn: just work fine.
But I really want the button to react to tappings.

Where should I look for an explanation?

Gerriet.



Join cocoa@apple-dev.groups.io to automatically receive all group messages.