2

I have a UITextbox on the bottom of my screen (which is the table you see in the graphic below).

On the iPhone 3GS/4/4S it shows up correctly on the bottom. However, on my iphone 5, it is on the same screen where it would normally be on a regular iphone, screenshot below:

iphone 5 retina display

Is there a way to resolve this through IB or must it be done with code?
You can see a bit of blank white space at the bottom where the last tab is cut off, it looks like its still reserving room for the input box.

4

1 回答 1

3

In interface builder (where you're using strings & struts and NOT auto layout), you can change what you're looking at by selecting the view controller you want to work with and then, in the Attributes Inspector for the view controller, touch this pop-up menu:

iPhone 5 screen size:

enter image description here

iPhone 4 & earlier screen size:

iPhone 4S & earlier screen sizes

You can then see the difference between the two iPhone screen sizes.

Now, to get the text field to hug (or stay aligned at the bottom), click the bottom strut for the text field. It should look something like this:

I think this is a strut, not a spring

于 2013-01-13T04:54:44.230 回答