I\'m trying to figure this out since last week without going any step further. Ok, so I need to apply some constraints programmatically
If you find the above to be ugly. You should consider using a DSL for constraints. Such as SnapKit Makes constraint API much more user-friendly
view.snp.makeConstraints { make in make.edges.equalToSuperview() }