title: How to modify UIMenu before it's shown to support dynamic actions
body: <p>iOS 14 adds the ability to display menus upon tapping or long pressing a UIBarButtonItem or UIButton, like so:</p>
  <pre><code>let menu = UIMenu(children: [UIAction(title: &quot;Action&quot;, image: nil) { action in
      //do something
  }])
  button.menu = menu
  barButtonItem = UIBarButtonItem(title: &quot;Show Menu&quot;, image: nil, primaryAction: nil, menu: menu)
  </code></pre>
  <p>This most often replaces action sheets (<code>UIAlertController</code> with <code>actionSheet</code> style). It's really common to have a dynamic action sheet where actions are only included or may be disabled based on some state at the time the user taps the button. But with this API, the menu is created at the time the button is created. How can you modify the menu prior to it being presented or otherwise make it dynamic to ensure the appropriate actions are available and in the proper state when it will appear?</p>