Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

99miles

macrumors member
Original poster
Oct 10, 2008
50
0
Hi-
I have a view that I rotate 90 degrees when the phone flips to the left landscape orientation. This is done automatically by shouldAutorotateToInterfaceOrientation.

At that point when I click on the rotated view, hitTest is accurate, as the coordinates for that view have automatically been updated by something under the hood.

However, if i then move that view, the coordinates are off. It seems that it forgot that it's rotated. If I touch on the view, hitTest doesn't think I'm on the view, but if I touch above the view it think it's been hit.

I tried setting the rotation again after the move to see if it would update the coordinates, but that didn't help.

Any ideas?
Thanks in advance!
 

lawicko

macrumors member
Jul 17, 2008
44
0
I guess you use CGAffineTransform to translate the view, right? If yes, try to animate center property of the view instead. It worked for me when I had similar issue some time ago.
 

developer.in

macrumors newbie
Nov 5, 2008
8
0
I guess you use CGAffineTransform to translate the view, right? If yes, try to animate center property of the view instead. It worked for me when I had similar issue some time ago.

Hi

I'm trying to rotate a view which has a nav bar, a toolbar and the center of the view has an imageView. When I rotate the phone to left landscape, the toolbar disappears and the image which was displaying in the center of the screen snaps to right below the navbar. What view settings for the UIImageView should I specify in the IB?
 

lawicko

macrumors member
Jul 17, 2008
44
0
I know nothing about IB, but I think you should experiment with contentMode property of your view.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.