I want to implement the rotation in my application.
So I made my canvas autoresizing. Here's the code:_canvas.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
But when I try to draw on it with touch the coordinates are bad.
Bad, I mean I touch somewhere on the screen the touchevent gives me other coordinates and the application draws on the wrong coordinate. If I don't rotate the iPhone the touchevent gives me the right coordinates. Any suggestions why can this happen?Edit:
And开发者_开发百科 one more thing. The (0, 0) coordinate is good. Higher coordinates are shifted to the lower-right corner.Check this out, it should help
http://www.satosoft.com/index.php/2008/12/11/rotating-the-iphone-screen/#comments
精彩评论