I am running through an iPhone development tutorial and I have a weird bug that I am investigating using the debugger. I have the following code that checks to see if a object is in bounds. I am trying to see what the value of ball.center.x is at a certain point, but because center is a property accessor selector, I don't get the value when I hover over it in the Xcode debugger.
if (ball.center.x > self.view.bounds.size.width || ball.center.x < 0) {
ballVelocity.x = -ballVelocity.x;
}
Is there a way to do this? I think I must just be missing something. I suppose I could update the code to assign the value to a variable that I could then watch in the debugger, but that seems like a sloppy work around to a common problem.
Thanks!