开发者

Best way to change XIB files based on rotation? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 5 years ago.

Improve this question

My app has so far just been a portrait-based application. However, I am adding landscape mode to a new version, but have found that my XIB files look shocking when rotated from portrait to landscape. Apparently I need to make a landscape version of each XIB and use some code to change with XIB launches based on what rotation occurs. A开发者_如何学Pythonm I right? If so, where do I go from here? Are there any Apple sample apps utilising this code?

FYI - My XIB files just have text in them.

Thanks.


If you have a complex view, the automatic resizing may not work well enough. If so, your best bet is to have separate views loaded from separate nibs for each orientation.

To set this up, see here: Easiest way to support multiple orientations? How do I load a custom NIB when the application is in Landscape?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜