My whole app is in landscape mode, and I am trying to rotate my view transform so that I can draw with the upper left corner as 0,0. I have it almost working, however there are some fatal flaws and surely someone with better analytic geometry skills than I can straighten me out.
I create a transform and apply it to my view:
Code:
g_landscape_transform = CGAffineTransformMakeRotation(1.57079633);
g_landscape_transform = CGAffineTransformTranslate (g_landscape_transform, -80.0, +80.0);
myview = [[LevelView alloc] initWithFrame:applicationFrame viewController:self];
[myview setTransform:g_landscape_transform];
This transform when applied to the view draws okay. However when I try to respond to touches, the touches don't work on the right side of the screen because when you dump out the values of the the view frame, bounds, and center, you see that the frame is still in portrait mode, along with bounds, and the center is in the old unrotated coordinates.
Well I thought, gee I will just set the bounds and frame to (0, 0, 480, 320), and that should fix things. NOT. after trying to set just bounds, my backgorund shifted over when I drew it, and I can't figure out why setting bounds changes how my stuff is drawn. Surely somebody must know how to set up a view-wide transform that also works with clicks.