0

In this scene of my app, the chatroom name and password text fields are blocked off although I added constraints to all of the objects in the scene. What am I doing wrong, and how can I fix the scene so that I can fit all of the objects on the screen regardless of device?

There are constraints for all of the objects in the scene, but the TextFields are cut off when running the app.

Screen cuts off textFields here

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Abhi V
  • 714
  • 1
  • 4
  • 19
  • 1
    It would be better if you could also show the screen image when it is blocked. Assuming you set up the constraints correctly, you might want to check out [content compression resistance](http://stackoverflow.com/questions/15850417/cocoa-autolayout-content-hugging-vs-content-compression-resistance-priority). Since I don't see you have scrollview underneath your views, when the screen is not enough to fit all your views some elements must give in. You can make sure your textfields don't do that by setting its content compression resistance or by weakening your other view's constraints – Dickson Leonard Jul 05 '16 at 04:49

1 Answers1

1

You can add relative to top layout constraints to Chat room name and horizontal constraints to password text.

Then same(relative horizontal constraints) apply for Enter Chat room button and Table view

il_raffa
  • 5,090
  • 129
  • 31
  • 36
Nattudurai
  • 856
  • 7
  • 9