How to set target and action for UIBarButtonItem at runtime February 25, 2023 by Tarik Just set the UIBarButtonItem’s target and action properties directly.