title: iOS VoiceOver wait on element to finish reading before changing to next element
body: <p>I have a button that can toggle a label being shown:</p>
  
  <pre><code>class ViewController: UIViewController {
      @IBOutlet weak var label: UILabel!
      @IBOutlet weak var button: UIButton!
  
      override func viewDidLoad() {
          super.viewDidLoad()
          button.accessibilityLabel = "You can tap this really long string that i'm testing"
          label.accessibilityLabel = "This is a label"
      }
  
      @IBAction func buttonTapped(_ sender: UIButton) {
          label.isHidden = !label.isHidden
          if !label.isHidden {
              UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, label)
          }
      }
  }
  </code></pre>
  
  <p>When tapping the button, if the label is shown I activate the label to be read by VoiceOver. The problem is VoiceOver automatically starts reading the button's <code>accessibilityLabel</code> when the user taps the button. This results in VoiceOver reading half of the button's <code>accessibilityLabel</code> before swapping to reading the label's <code>accessibilityLabel</code> (e.g. "You can tap this really...This is a label").</p>
  
  <p><strong>Is there a way I can know when VoiceOver is done reading the button's <code>accessibilityLabel</code> and only <em>then</em> call <code>UIAccessibilityPostNotification</code>? Or is there a way to disable the button from being read again by VoiceOver when the user taps the button?</strong></p>
  
  <p>An example project can be seen here: <a href="https://github.com/rajohns08/VoiceOverTest" rel="nofollow noreferrer">https://github.com/rajohns08/VoiceOverTest</a></p>