[quote='809291022, Frameworks Engineer, /thread/766374?answerId=809291022#809291022']
When you set the primary action, we take the title & image from that action for the bar button item
[/quote]
Thanks! I see now that the documentation for primaryAction says this as well. Though in other places in my project I use
let button = UIBarButtonItem(title: "button", primaryAction: UIAction(handler: { action in
...
}))
which works fine and I assumed was the same as
let button = UIBarButtonItem(title: "button")
button.primaryAction = UIAction(handler: { action in
...
})
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: