To fire an event programmatically you need to call sendActionsForControlEvent
button.sendActionsForControlEvents(.TouchUpInside)
—
Swift 3
button.sendActions(for: .touchUpInside)
To fire an event programmatically you need to call sendActionsForControlEvent
button.sendActionsForControlEvents(.TouchUpInside)
—
Swift 3
button.sendActions(for: .touchUpInside)