I would like to know if anyone have an idea about a problem I have !
I have a simple viewController, with a custom appDelegate.window.frame (0, 20, width, height), with its own navigationController. I implemented a UIButton, that present an empty view controller.
UIViewController *v = [_controllersList objectAtIndex:indexPath.row];
v.modalPresentationStyle = UIModalPresentationCurrentContext;
[self presentViewController:v animated:YES completion:nil];
By now, everything is working. If I present that new controller (everything is fine with it!). When I dismiss the new view, my original view controller frame has changed graphically but not programmatically!
(The result is that my window is stuck to the top of the view, and cropped, with 20 blacks pixel to the bottom).
For me the solution was changing the default modalPresentationStyle property:
v.modalPresentationStyle = UIModalPresentationOverFullScreen;
Hope it helps.
you can present the view controller from the window rootviewcontroller
[self.view.window.rootViewController presentViewController:v animated:YES completion:nil];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With