I am stuck at a Local to Global Point issue in Objective C ViewController base Application
I have one ScrollView as a SubView of the ViewController which has Around 13 to 15 UIButtons as a SubView at a Time there are only 3 UIButton which are in the View of the ScrollView.
What i want is to get the CGPoint(Global) of the UIButton which is a subView of ScrollView but not the local CGpoint inside the ScrollView.
Is there a way to get the Local CGPoint to be Converted to Global CGPoint.
Thanks Guyz
KK
say you have a
UIButton myButton, try:CGPoint globalPoint = [[[UIApplication sharedApplication] keyWindow] convertPoint:CGPointZero fromView:myButton];and to convert back
CGPoint localPoint = [myButton convertPoint:globalPoint fromView:[[UIApplication sharedApplication] keyWindow]];