When I execute Swift methods in Objective-C the code which is inside of that method does not run.
For example: I want to open a new view or enable a button.
Objective-C code:
Principal *myClass = [[Principal alloc] init];
[myClass getData];
Swift code:
func getData() {
let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let vc: UIViewController = storyboard.instantiateViewControllerWithIdentifier("MenuViewController") as UIViewController
dispatch_async(dispatch_get_main_queue(), {
self.presentViewController(vc, animated: true, completion: nil)
})
}