title: Call view controller method from custom class
body: <p>I have a custom class and a view controller.</p>
  
  <p>My custom class:</p>
  
  <pre><code>class ChatManager:NSObject {
  
      func messageArrived() {
           //When Message arrives I am handling it from here
           //I need something like that: Viewcontroller.updateTable()
      }
  }
  </code></pre>
  
  <p>When message arrives from internet I need to update tableview in view controller. So I mean I have to call a view controller method from <code>messageArrived</code> method. How can I do this ?</p>