i have a UILabel (name : lbl) and a UIView , except main view (name : myView)
i added my label to myView as subview
now ! i want to get the position of the label in main view ! not in myView
this is my project :
http://www.mediafire.com/?w63bnurf28n8cnb
i dont want to use this code :
CGPoint pos;
pos.x=myView.frame.origin.x+lbl.frame.origin.x ;
pos.y= myView.frame.origin.y+lbl.frame.origin.y ;
because if i want to rotate the myView using CGAffineTransformMakeRotation this code does not work !
i want position of the label in main view !!
UIViewhas methods build in for converting points up and down the view hierarchy 🙂 Either of these should do the trick.