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