Finding a sublayers position on the screen after several CATransforms?
My iPhone app has a mainView. added as a sublayer to this MainView is CircleView. CircleView rotates as the phone turns and tilts as the phone tilts, using 3 concatenated CATransform3D transforms. DotView is added as a sublayer to CircleView. After all these transoforms, I have no easy (or apparent) way of knowing the coordinates of dotView in the mainView coordinate system.
I also have another view, squareView, added to mainview as well. I do know the coordinates of squareView in mainView's coordinate system.
I want to use Quartz 2D to draw a line between a dotView an开发者_开发技巧d a squareView. How do I find out out the coordinates of squareView in order to draw a line between the two?
Thanks.
You probably want to look at the presentationLayer property of the layer in question.
精彩评论