开发者

Fitting views for Portrait and Landscape for iPad

I am coming onto a project that only looks good in landscape view. When I switch to portrait, it looks like all the elements stay where they are and things do not get resized to fit the view. Some of the content on certain pages might not fit in portrait mode at all based on how things are already laid out in landscape.

If I want to make the app 开发者_Python百科look good in both orientations, is my best bet to play around with the resizing on the size inspector for views that items will fit fine.

And then for views where items do not fit easily, rethink the design and either use some iPad functionality like popover, or create a separate view to display the data differently instead of just resizing?

Thanks.


Quite a bit can be achieved by playing with resizing controls in IB (especially the ones that stick the control to a side - sometimes it may be not very obvious, like "stiking"the control that's on top to the bottom side).

However, a much more robust solution is to have a method that would reposition/resize all your controls depending on the screen size (1024x768 or 768x1024). Then call it whenever the device is rotated.

Such a method is also quite handy for other purposes - e.g. if you have a view that is only sometimes visible (like an ad), you'll need to resize the rest to a non-full-screen size.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜