AutoLayout complains about constraints for 2 UITextFields with no borders

前端 未结 1 1484
面向向阳花
面向向阳花 2020-12-22 06:29

I am trying to build my login view that has only 2 TextFields, and 2 buttons. I am applying the \"Add Missing Constraints\" property so that Xcode applies the corresponding

相关标签:
1条回答
  • 2020-12-22 07:14

    "Add Missing Constraints" is not always a good idea to add constraints..rather you should always prefer to add constraints manually...

    Here is the image for your UI...I used wAnyhAny layout as it is good practice for add constraints for universal devices...

    enter image description here

    I used simply width constraint for textfield, rather you should Equal width to super view and add multiplier to resize width according to device width

    Here is the output image in different sizes...

    enter image description here

    0 讨论(0)
提交回复
热议问题