0

For some weird reason, seguieing back to a view controller changes the userInteractionEnabled of my view's subview _settingsButton which is of UIButton type. I want to know why this happens. After setting a breakpoint in the view controller's code, I attempt to do this:

enter image description here

But I have no idea how to access an instance variable of the _settingsButton property of my view controller. How do I do this?

oarfish
  • 4,116
  • 4
  • 37
  • 66

1 Answers1

2

In my experience, the simplest way to do this is to set a symbolic breakpoint on (in your case) [UIButton setUserInteractionEnabled:], in the breakpoints panel on the left side. Click +, then symbolic breakpoint, and then the quoted string above. I have done this in the past and it does work, so if you have any grief with the above, you could fiddle with the syntax a bit.

Chris Conover
  • 8,889
  • 5
  • 52
  • 68
  • Right, the point here being that properties are really data, and so aren't something you can watch. There is sometimes a backing ivar - and if you happen to know what it's name is you can watch that. But there may not even be that, just a getter that returns the value, and a setter that sets it... Note also, it is possible to rename the setters & getter's, so they won't necessarily have the canonical name. That's just something to keep in mind if the breakpoint you put on the setter isn't being hit. – Jim Ingham Jul 27 '15 at 23:11