I create my application using storyboards. So that I can open another view controller when the button is preesed, by dragging and dropping. Then I can choose presentation= over current contextfor segue in the storyboard. But I want to do this programmatically. I found the answer, but he says that it will only work for ipads.Imm creating a universal application, so I want to work on all devices.
- Is it possible.
- And how can I do that.
in my first view controller
UIStoryboard *story = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
UIViewController *middleViewController = [story instantiateViewControllerWithIdentifier:@"FlightMiddleViewController"];
and in my second view controller, the viewDidLoad method that I put
self.modalPresentationStyle = UIModalPresentationOverCurrentContext;
. , while, black.I , .