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