What is causing problem ?
You should create a stackView
add the buttons inside
set constraints as needed.
This should help with a lot of sample code:
https://stackoverflow.com/questions/30728062/add-views-in-uistackview-programmatically
Topic:
Programming Languages
SubTopic:
Swift
Tags: