title: How to call a function from a different swift file
body: <p>I have multiple swift files of type UIViewController in my Xcode 6 beta-2 project.</p>
  <p>I basically want to know some data from file A to use in file B.</p>
  <p>My files are both UIViewControllers, and I have created a function with no parameters which returns a string in UIViewController_A. When I try and call said function in UIViewController_B, intellisense fills it out for me but says I have to have a parameter which autofills as UIViewController_A).</p>
  <p>In the code, LoginScreen.swift == ViewController_A, and ViewResidentsTask == ViewController_B.</p>
  <p>My function is called checkPrivs, exists in LoginScreen.swift and looks like this:</p>
  <pre><code>func checkPrivs()-&gt; String{
      return userPrivType
  }
  </code></pre>
  <p>this is how I think it should be called:</p>
  <pre><code>var userType = LoginScreen.checkPrivs()
  </code></pre>
  <p>this is what intellisense does when I try and call it:</p>
  <pre><code>var userType = LoginScreen.checkPrivs(LoginScreen)
  </code></pre>
  <p>This throws up an error saying &quot;Expected ',' seperator&quot;
  Not really sure what I should be replacing LoginScreen with but everything I've tried (empty, string, current file name) throws up an error.</p>