on button click swift code example Example: button click programmatically swift button.sendActions(for: .touchUpInside)