Questions tagged [uimodalpresentationstyle]
157 questions
35
votes
4 answers
UIModalPresentationPopover for iPhone 6 Plus in landscape doesn't display popover
I want to always present a ViewController in a popover on all devices and all orientations. I tried to accomplish this by adopting the UIPopoverPresentationControllerDelegate and setting the sourceView and sourceRect.
This works very well for all…

Loegic
- 3,390
- 20
- 33
23
votes
3 answers
iOS 8 keyboard hides my textview
I have a UIViewController presented using self.accountViewController.modalPresentationStyle = UIModalPresentationFormSheet; and now in iOS 8 the last UITextView is hidden from the keyboard when it will pushed up. How to avoid It?

Alessio Crestani
- 1,602
- 4
- 17
- 38
21
votes
6 answers
Popover with ModalPresentationStyle is not centered in iOS 7 iPad
I have a problem with iOS 7 that seems to be a bug or I just don't do something right. I have modalViewController that appears as a popover on iPad with ModalPresentationStyle. And it is not standard size, custom sized.
Here is the…

titicaca
- 813
- 1
- 11
- 20
18
votes
2 answers
Benefit of using .fullScreen presentation style in compare to .overFullScreen presentation style in ios
I am curious to know that what is/are the actual benefit(s) (with some example) we get if we use .fullScreen versus .overFullScreen presentation style while presenting a view controller modally over rootViewController in an iOS app.
I read using…

user3247895
- 473
- 1
- 6
- 14
12
votes
1 answer
Using definesPresentationContext with UIModalPresentationStyle.custom
I am using view controller containment to manage a set of child view controllers which should be able to modally present other view controllers in a custom manner.
I have run into an issue where the definesPresentationContext property is not used…

simeon
- 4,466
- 2
- 38
- 42
12
votes
2 answers
UIModalPresentationStyle.CurrentContext Swift iOS 7
I want to show a View - PresentedView over another view - Background View using iOS 7. In my app, I am using UITabBArController, so at runtime I don't know which view would be the background view (could be any of the tab bar items). Below is the…

Sategroup
- 955
- 13
- 29
10
votes
3 answers
Custom presented UIViewController changing to fullscreen
I have a view controller presented using UIModalPresentationCustom presentation style. I use a custom UIViewControllerTransitioningDelegate to present the view controller as a sidebar (so it slides in from the edge of the screen and does not occupy…

simeon
- 4,466
- 2
- 38
- 42
10
votes
3 answers
UIModalPresentationCurrentContext with Transition?
I am trying to modal present a view controller like below:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
UIViewController *vc = [storyboard…

Josh Kahane
- 16,765
- 45
- 140
- 253
9
votes
1 answer
What is difference between UIModalTransitionStyle and UIModalPresentationStyle?
For UIViewController, we have UIModalTransitionStyle and UIModalPresentationStyle
Question is what is the difference of them ?

Forrest
- 122,703
- 20
- 73
- 107
9
votes
2 answers
How to present a modal view controller with custom size in center?
I want to present a custom-sized modal view controller with animation from the bottom. I can achieve this animation with ModalPresentationStyle to FormSheet, but it forces me to use the default size which is 540x620 and my view doesn't fit.
How do…

Dan Abramov
- 264,556
- 84
- 409
- 511
8
votes
1 answer
UIModalPresentationStyle.FormSheet Always full screen on iPad (SWIFT)
I'm trying to translate some Objective-C code to SWIFT.
I'm loading a UIViewController as a Form Sheet.
Here's the code in objective-c:
generalPopup.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
generalPopup.modalPresentationStyle =…

YogevSitton
- 10,068
- 11
- 62
- 95
7
votes
1 answer
iOS 8.3 modalPresentationStyle OverCurrentContext does not inherit status bar appearance and visibility
Consider the following setup:
You have a simple application with a single UINavigationController subclass and a single UIViewController subclass in it.
The UINavigationController overrides preferredStatusBarStyle() method and returns…

KoCMoHaBTa
- 1,519
- 15
- 16
7
votes
2 answers
Unwind Segue not dismissing View Controller with UIModalPresentationCustom
I'm presenting a modal view controller using a custom transition (by setting its modelPresentationStyle to UIModalPresentationCustom, providing a transitioning delegate, and UIViewControllerAnimatedTransitioning object).
In the presented view…

baxterma
- 811
- 1
- 11
- 22
7
votes
2 answers
How to present a semi-transparent (half-cut) viewcontroller in iOS 8
in iOS 7 there is no problem for this method:
_rootViewController.modalPresentationStyle = UIModalPresentationCurrentContext;
[_rootViewController presentViewController:self animated:NO completion:nil];
But in iOS 8 it did nothing.How to solve it?…

SuperHappy
- 161
- 2
- 11
6
votes
1 answer
'UIPopoverController' is deprecated: first deprecated in iOS 9.0
I have developed a project that shows error :
'UIPopoverController' is deprecated: first deprecated in iOS 9.0 - UIPopoverController is deprecated. Popovers are now implemented as UIViewController presentations. Use a modal presentation style of…

marian
- 277
- 1
- 5
- 17