I have scrollView in which there are 12 buttons. On window only four buttons are visible at a time. For animation purpose I need button's position regarding to the window.
I had followed these methods but its not working for me:
[btn.superview convertPoint:btn.frame.origin toView:nil];
btnImgeView.frame= CGRectMake(btn.frame.origin.x + 10, 240, btn.frame.size.width, btn.frame.size.height);
btn.frame.origin.x is taking coordinate from scrollView's origin not from the origin of the screen.
how can I get the button's position regarding to the window?