As iOS14 offers an easy way to setup the menu on the UIBarButtonItem
, I wonder do I miss that there is no easy way to setup its items as they may depend on the current context.
I see that there is UIDeferredMenuElement
, but this doesn't seem to be a good use case for it?
Also I see that there is primaryAction
, but there doesn't seem to be a trivial way to call the menu from there.
And the third option seems to be reshuffling the menu on each change that may affect it, but that doesn't seem like a great idea.
I assume that there is something I miss out.