0
我有一個UIImageView
,當我觸摸它,我可以得到觸摸的位置:旋轉後的UIImageView touchLocationInView不正確
[touch locationInView:theUIImageView]
的問題是,當我旋轉的UIImageView有:
theUIImageView.transform = CGAffineTransformMakeRotation(DegreesToRadians(arc4random()%15));
[touch locationInView:theUIImageView]
不再返回水龍頭的正確位置! *喘氣!
關於如何獲得real tap location
的任何建議?
請您詳細說明一下嗎?我不確定你想要解釋什麼 – Parad0x13 2012-04-11 01:50:20
你可以調用locationInView來獲取視圖中的位置。您碰巧正在使用旋轉的圖像視圖,但您可以通過將它傳遞給locationInView來獲取父視圖內的觸摸位置。 – Nick 2012-04-11 01:53:36