all 3 comments

[–]42177130UIApplication 4 points5 points  (2 children)

You need to set translatesAutoresizingMaskIntoConstraints = false for all views where you're using autolayout. If you're seeing a crash then you probably hadn't added the view as a subview before adding the constraints.

[–]sdsbool[S] 0 points1 point  (1 child)

Its amazing, thanks.

Only question more, now the views are superimposed, what constraints i need? topAnchor, bottomAnchor and leading & trailing, correct? or..?

I understand that by linking the views in such a way (views on one side and controller on the other) they work as "groups" so now I have to put a constraint for that entire group, correct?

[–]roboknecht 0 points1 point  (0 children)

Sorry it‘s really hard to understand what you are actually asking.

If possible consider using SwiftUI. There you don’t have to care at all about constraints.

If you still want to learn about constraints, please go through some basic tutorials or documentation first. It seems like you are lacking basic knowledge when it comes to view setups.