Xcode5 ( 3.5" screen to 4 inch )

2019-03-06 07:10发布

Recently I had upgraded to Xcode 5 and opened a project that had been created in Xcode 4.6.1. All the images and buttons had moved around so I went back and re-arranged everything. Now a new problem has occurred, when I switch from the 4" simulator to 3.5 inch images get cut off, buttons and toolbars move around as well. I been searching for an answer for days and Im new to stackoverflow so I hope I have follow all rules and my question in the correct section.

Few notes on the project:

Using Autolayout, Size - Inferred, Orientation - Inferred

Opens in: Default 5.0, Project Deployment Target 7.0, View as: iOS 7.0 and Later

1条回答
家丑人穷心不美
2楼-- · 2019-03-06 07:38

It sounds like you do not have any constraints on your objects. You will need to add them in order for autolayout to work the way you want.

If you are not wanting to add constraints programmatically than you can simply add them to objects in IB.

Click the object you want to add constraints to:

Editor -> Resolve Autolayout Issues -> Add Missing Constraints.

That will give you a good place to start with and you can further adjust the constraints from there.

查看更多
登录 后发表回答