0

I edited my view with auto layout. I clicked add missing constraints. I'm working 4 inch screen on mainstoryboard. Everything looks good for 4 inch, but not the other iphone screens. I tried some ways like someone did, but I didn't fix it.

Snapshot :

enter image description here

This screen from iPhone 6s. Something going wrong for picker view, google ad and the others.What shoul I do? By the way sorry for black lines.

enter image description here

My view and UIs are here. How should I do the constraints for each every one of them? I'm really new for iphone layout. If you explain step by step basically, I really appreciate for that.

6
  • set constriant by multiplier remove constnt value Commented Mar 3, 2016 at 13:07
  • It's not getting error or what. what are you suppose to mean? sorry I don't understand. Can you explain? Commented Mar 3, 2016 at 13:30
  • i do not know how you did set autolayout constraint . it has constnt value or dependent on screen size? Commented Mar 3, 2016 at 13:35
  • I's not a constatn value. I set the autolayout in the mainstoryboard. I'm using 4 inch iphone form and it has to be fit for all screens. Commented Mar 3, 2016 at 13:42
  • which constriant did you put on view can you write there ? Commented Mar 3, 2016 at 13:44

2 Answers 2

1

Sorry but clicking add missing constraints it's never the ideal solution, you really should understand how and which constraints you really need for your layout.

If you have clicked add missing constraints now you probably have a lot of constraints, you need to check for example your picker view which constraints it has and fix one of them or more.

So IMHO now you have two ways: post here, updating your post, the full list constraints you have for one object at least and we can try to help you, of course, I'm the first; the second solution it's clear all constraints and add one by one, understanding each rules: it could be boring at first but it will be really helpful believe me.

Sign up to request clarification or add additional context in comments.

1 Comment

okay I edited my question an added my view and UIs. I want to add one by one, but It's really hard. Can you explain me how to make one by one?
1

I would begin adding your layout constraints from the top of your view controller. You can add the constraints manually by right click dragging from the target object to another object. Most of the time, it is necessary to add at least two constraints to a view, one constraint that modifies the x coordinate of the object and another constraint that modifies the y coordinate of the object.

I would recommend using the leading/trailing space constraints and the top/bottom space constraints for all of your objects that you want to be hugging the view controller. After you make these constraints between the controller and the objects, add constraints between two objects. If all of the lines are blue or orange, you probably have sufficient and satisfactory constraints.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.