iphone - Maintaining proportions when autorotating custom UIView -


It's probably either real easy, real dumb, or my Google Fu has taken a serious turn for the worse anyway, I am implementing custom view for my app, which is using pure CGTtext drawing, any subviews (at least now). The thing is, I want to autorize it, so I have shouldAutorotateToInterfaceOrientation Yes, and the voice rotates the scene. But in doing so, it is not really reproducing the content (which I think is somewhere in the structure sung on a frame and sprayed on a reset, but it is not really relevant), the reset bus Spread, how can I get the issue of a draw just a big area while roaming? That is, my content is larger than the screen, and I want to change the viewport during rotation.

I have tried to set contentMode to the view> UIViewContentModeRedraw , but that did not do anything, I have tried autoresizeMask To play with the baggage, but did not seem to help. I have also tried to include willRotateToInterfaceOrientation in setNeedsDisplay , however, it only causes new reasons to repeat it to repeat the reason (i.e., before it is squishing Does, and then draws it to the right size during rotation), which is not what I want to see.

Does anybody have any ideas about how I can do it?

As it turns out, it's a mix of dumb and easy, I'm posting it here If anyone should read it someday The way I managed to solve it, in fact, there was a sandwich between a window and my view (I think you might be able to work directly on the window, but it is more comfortable in this way Felt). That is, I added my view as a child's view to that scene, which I call frames.

The frame is resizing in general, however, I close the size of the hair ideas, and the viewing area (usually square, 480x480, then it can cover the entire screen in any way Are) my own view is larger than the problem has been solved, basically

Now I am playing with the scene offset animating in the frame during the willRotateToInterfaceOrientation , it starts wandering around the center, rather than the upper left corner, but this is a different question is.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -