title: Custom UIControl element with global state for all instances
body: <p>I have drawer controller presenting menu in the iOS app.
  This menu is toggled by pressing menu buttons (UIButton) available on each screen.</p>
  
  <p><a href="https://i.stack.imgur.com/QwWm1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QwWm1.png" alt="enter image description here"></a></p>
  
  <p>As you can see in the mock: menu buttons can have red dot showing that new content is available - for this case I simply have two images for menu button without dot and with it.</p>
  
  <p><a href="https://i.stack.imgur.com/PJaQS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PJaQS.png" alt="enter image description here"></a></p>
  
  <p>I thought about making custom UIControl with "global" property for this dot. Is it the right way?</p>
  
  <pre><code>class MenuButton : UIButton {
    static var showNotificationDot : Bool = false
  }
  </code></pre>