I see that in the storyboard, under Constraints, it lists all of the constraints being used. I am currently doing video tutorials and I think it would be a lot easier to simply write down what I see instead of dragging and connecting everything right now. Is there a way to do this?
Asked
Active
Viewed 74 times
0
-
Please read [Auto Layout Guide: Programmatically Creating Constraints](https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AutolayoutPG/ProgrammaticallyCreatingConstraints.html) – vadian Aug 03 '18 at 16:41
-
@vadian Yes I understand you can do it that way, but that is not what I asked for. I asked if there is a way to do it inside of the main storyboard. – Charlotte K Aug 03 '18 at 17:31
1 Answers
0
Yes. The respective classes to use are 'NSLayoutConstraint' and 'NSLayoutAnchor'. It is described in the programming guide "Auto Layout Guide".
BTW: I just found another question that actually shows some code how to use it: How to set UITextField width constraint to have room for a certain string

Peter Branforn
- 1,679
- 3
- 17
- 29