I\'ve been trying to add constraints programmatically to a view that I\'m also adding programmatically to my view controller. However, it seems like the constraints are not
set translatesAutoresizingMaskIntoConstraints = false to any view you are settings constraints programatically.
from the apple doc:
translatesAutoresizingMaskIntoConstraints
If you want to use Auto Layout to dynamically calculate the size and position of your view, you must set this property to false, and then provide a non ambiguous, nonconflicting set of constraints for the view.