problem xcode constrains

0

Good afternoon. I have finished my app with a few buttons, the problem comes when I change the screen and move to iPhone 6 for example or any other screen.

I have tried many combinations, do you think of examples of constrains to adapt? even if it's only inside iphones, I would not mind doing the same for ipad.

Forget the white box that appears in the lower right corner.

    
asked by Sergio Cv 06.10.2016 в 16:51
source

2 answers

0

Have you tried Add Missing Constraints? On the Resolve Auto Layout Issues button.

Delete the previous Constraints in the "Clear Constraints" option and then "Add Missing Constraints". That should help a little.

    
answered by 14.10.2016 в 08:12
0

You should eliminate all restrictions and static positioning of the elements that make up the screen and create% dynamic_co_counts that allow you to position the elements according to the size of the screen.

For example, you would start with the top button by placing it in the center of the screen. To do this you must go to the Size Inspector and with the right button select the element to position:

-CHINNER CENTRAL SUPERIOR:

  • "Center Horizontally in View" with View.
  • "Top Space to View" with View.

INFERIOR ICONS 1st ROW:

* Left:

  • "Top" with Top Central Icon. (vertical space with respect to the upper icon)
  • "Leading Space to View" with View. (lateral space with respect to the view)

* Right:

  • "Top" with Top Central Icon. (vertical space with respect to the upper icon)
  • "Leading Space to View" with Left Icon 1st Row. (lateral space with respect to the icon of the same row)

LOWER ICONS 2nd ROW:

* Left:

  • "Top" with Icon Bottom 1st Row. (vertical space with respect to the icon in the top row)
  • "Leading Space to View" with View. (lateral space with respect to the view)

* Right:

  • "Top" with Icon Bottom 1st Row. (vertical space with respect to the icon in the top row)
  • "Leading Space to View" with Icon Left 2nd Row. (lateral space with respect to the icon of the same row)

In this way you will be able to position the elements independently of the size of the screen.

I hope you find it useful.

    
answered by 14.10.2016 в 12:40