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?
Asked
Active
Viewed 145 times
0
-
1It 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 Answers
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
-
-
using Auto layout, Pls find the below article http://www.appcoda.com/introduction-auto-layout/ – Nattudurai Jul 11 '16 at 08:53