Xcode – How to create a button programmatically with for loop in swift
I created buttons with for loop and i want to print button number when pressed to button. How can i do this? for x in 0..<5 { let button = UIButton(frame: CGRect(x: CGFloat(x) * view.frame.size.width + 10 , y: 40,…