简体   繁体   中英

Set auto constraints in such a way that it displays same in all devices in ios swift

I have a register form in ios swift in which i have applied auto constraints for iphone 7plus. but i am not getting same in all devices. how can i do it for 5s, 6s plus and 7s plus device. looks good in 6s plus and 7s plus but not in 5s

below screenshot for iphone 5s

iPhone 5S

screenshot of what i have tried below

我试过的

For ProfileImage

  • set Horizontally in Container
  • set Width and Height of image
  • set Top constraint

For ALL TextFields

  • place all fields in the vertical StackView

  • Set Stackview DISTRIBUTION property to FILL EQUALLY

  • set Stack view leading, trailing constraint

  • set Stackview vertical constraint in Container

  • set Height for Stackview

For NEXT BUTTON

  • set Leading, Trailing constraint and Height constraint

  • set Top constraint to Stackiew

For Already You have an ACCOUNT

  • set Leading, Trailing constraint and Height constraint

  • set Bottom constraint to View

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM