title: Class name as a function parameter in swift
body: <p>Is there a way to refer to a class inside of a function that is placed in another class?</p>
  
  <p>Simplified, class number one would look like this:</p>
  
  <pre><code>class ClassOne: UITableViewController, NSFetchedResultsControllerDelegate {
  
      override func viewWillAppear(animated: Bool) {
          super.viewWillAppear(animated)
  
          Client().fetchFunction(ClassOne)
  
      }
  
      func otherFunction(){
          ...
      }
  
  }
  </code></pre>
  
  <p>Class number two looks like this:</p>
  
  <pre><code>public class ClassTwo: NSManagedObject, NSFetchedResultsControllerDelegate {
  
      func fetchFunction(originClass: ???.Type){
  
          originClass.otherFunction()
  
      }
  
  }
  </code></pre>
  
  <p>My attempt to solve the problem does not work, indicated by the "???" placed above. All types I have input for "???" resulted in error messages.</p>
  
  <p>Any ideas how to solve the problem? I also tried to follow <a href="https://stackoverflow.com/questions/32220642/class-as-function-parameter-in-swift">Class as function parameter in Swift</a> but it does not seem to work for my case.</p>