I'm building my app using storyboard.so I can open another view controller when button preesed,by dragging.and then I can select presentation
= over current context
for the segue in storyboard.But what I want is to do this programmatically.I found an answer,but it says it will work for only ipads.I'm building an universal app, so I want to work it for all devices.
- Is this 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, viewDidLoad method I put
self.modalPresentationStyle = UIModalPresentationOverCurrentContext;
it works for a while.that means it transparent for while and then screen black.I don't know why is that.