objective c - IOS 8 Interface builder UITableViewCell alignment -
I am working on the iOS app which has got the UITBAView. I need custom UITableViewCell, so I created the .xib file to design it and linked it to my custom class. But I want a button to be aligned properly and I can not achieve it. The screenshot below shows my problem:
I am using AutoLayout on the left side to mine. The xb has opened where I have a button. In between is a simulator that only shows a part of a button. In addition, if a change orientation, full button position does not change (it is fully visible). On the right you can see how I determine the constraints. Obviously, I did it wrongly, but I have tried everything and nothing helped. Different obstacles, values, toggled autollection - no effect How do I set up the obstacles, so that my button is aligned (on both the orientation)?
PS I am using Swift.
You need to link your button in the view that it contains, you can press Ctrl And drag the mouse from your button to the view in which it is included, Xcode will show a menu with available obstacles:
You have to select the necessary obstacles to set the position of the button, in your case it will take place for the container, In addition, you should select width and height barriers, to select those constraints, you can press this button at the bottom of the screen:
and choose Width and Heigath Barriers in the following menu:
Hope it helps!
Comments
Post a Comment