Square interview question

Implement a UI element with layout constraints programmatically.