button click programmatically swift

Swift
button.sendActions(for: .touchUpInside)
Source

Also in Swift: