How to make xib compatible with both iphone 5 and iphone 4 devices

前端 未结 14 1826
执念已碎
执念已碎 2020-11-28 20:39

I am trying to layout my xib so that layout fits in both iphone 5 (4 inches retina) and 3.5 devices.

Because I have to support IOS-5 I cannot use autolayout. I have

14条回答
  •  天涯浪人
    2020-11-28 21:02

    • In your storyboard, click 'Show file inspector'.
    • Under Interface builder document->Document versioning, select Deployment=iOS 5 (or your choice).

    If this doesn't work, you need to work with each of your views. Select them. Under Attributes inspector for each of them, under View section, see Mode attribute. Set this to 'Redraw'.

    If even that doesn't give satisfactory result, set the view size to the smallest of all the version you are going to use. And set the Mode attribute = 'Scale to fill'.

    Programmatically, Mode attribute is view.contentmode property.

提交回复
热议问题