Im trying to access the x and y positions of a view's origin (within a scrollview).
NSPoint p = [self visibleRect].origin;
NSLog(@"view's origin.x : %d", p.x);
If I inspect the first line in the debugger, the value of origin.x is set to some value > 0, depending on it's location. But the NSLog line will always print "view's origin.x : 0" .
What am I doing wrong here?
NSPoint p = [self visibleRect].origin;
NSLog(@"view's origin.x : %d", p.x);
If I inspect the first line in the debugger, the value of origin.x is set to some value > 0, depending on it's location. But the NSLog line will always print "view's origin.x : 0" .
What am I doing wrong here?