iPhone autorotation for too many objects on screen
I have a BlahAppDelegate, BlahViewController and no nibs in my iPhone app project. Only some subclasses of UIView in addition. All this is situated in main.m. My app has 6 subclassed UIViews. Each of it contains 18 UIImageViews.
I 开发者_开发技巧need to get autorotating work. Or custom rotating. Or something. For example it would be nice to fade the screen out when device is rotated, then move/resize views and then fade screen out. But I don't know how to automate it, without writing a resizing code for each of objects.
Please help me if you can.
The simplest approach would be to use the autoresizingMask property of your image views. These act just like the springs-and-struts in IB. If you position your views relative to their parents, and set these appropriately, you should have no problems. However, your options are somewhat limited; basically fixed distance from the edge, or proportionally spaced. No child-relative alignment is possible using just the flags.
精彩评论