how to add button dynamically in swift 4 code example Example: how to add button dynamically in swift 4 let button = UIButton(x:0; y:0, width: 80, height: 30)