how to display UIViewController from a NSObject class?
ios, nsobject, storyboard, uiviewcontroller, xcode4
Solution
At your `IBAction` or specific method write this:
UIWindow *window=[UIApplication sharedApplication].keyWindow;
UIViewController *root = [window rootViewController];
UIStoryboard *storyboard = root.storyboard;
CustomViewController *vcc =(CustomViewController *) [storyboard instantiateViewControllerWithIdentifier:@"storyBoardID"];
[root presentModalViewController:vcc animated:YES];
Problem
There is a current view as `UIViewController` which call "LoginView" but I'm not in, I'm in a `NSObject` class and I want to call, display an other `UIViewController` which is call "MapView". How can I do this? The problem is like above screenshot.