I want to get the position of a UIButton inside a UIScrollView the problem is that i get the same position for when the UIButton is in it’s original position or if I scroll down…
I’m using NSLog to print the position and I get the same output
Without scroll down i get...
2014-11-05 19:28:02.564 ... {{260, 163}, {370, 225}}
Even if I scroll down I get the same output...
2014-11-05 19:28:06.052 ... {{260, 163}, {370, 225}}
This is the code i'm using to obtain the position of the UIButton inside the UIScrollView...
NSLog(@"%@", NSStringFromCGRect(CGRectMake(myButton.frame.origin.x, myButton.frame.origin.y, myScrollDown.frame.size.width, myScrollDown.frame.size.height)));
There is a way to get the actual position of the UIButton even after I scrolled down?
There is another way to get the position of the UIButton inside the ScrollView?
I’ve already visited the following links and I have not resolved it yet.
get UIButton inside an UIScrollView absolute screen location
iPhone - Get Position of UIView within entire UIWindow
Cocoa: What's the difference between the frame and the bounds?
Thanks for any help!