Questions tagged [uipresentationcontroller]

Introduced in iOS 8, UIPresentationControllers allow you to control the "chrome" during a custom view controller transition.

Introduced in iOS 8, UIPresentationControllers allow you to control the "chrome" during a custom view controller transition.

95 questions
4
votes
1 answer

How to use modalPresentationCapturesStatusBarAppearance = NO with a custom UIPresentationController?

I have a custom UIPresentationController and overrides frameOfPresentedViewInContainerView for a custom viewController presentation. Everything works fine, except for the status bar. I do not want the status bar to change appearance at all – it…
4
votes
0 answers

Is there a way to use the new UIPresentationController with push/pop transitions, not just modal?

It seems all the docs I've read refer to using the new UIPresentationController with modal presentations, but none refer to UINavigationController-based push/pop transitions. Are these possible with iOS 8, if so, how do I present them?
3
votes
1 answer

UIKitCore layoutGuides deadlock

I am creating a popup menu. It has a UIPresentationController that calculates frameOfPresentedViewInContainerView based on presented view controller's view size before showing it. Presented view controllers consist of the fixed height outer…
3
votes
1 answer

How to update the frameOfPresentedViewInContainerView when using custom modal presentation?

I'm using a custom UIPresentationController to present a view modally. After presenting the view, the first textfield in the presented view becomes the first responder and the keyboard shows up. To ensure that the view is still visible, I move it…
3
votes
1 answer

topLayoutGuide equivalent in UIPresentationController?

I have a custom transition for presenting a view controller and I use a UIPresentationController subclass to perform the presentation. In the presentation controller I add a couple of subviews to its containerView (the chrome). I would like to…
Mischa
  • 15,816
  • 8
  • 59
  • 117
3
votes
1 answer

Custom UIPresentationController on iOS

I am customizing a UIPresentationController to simulate a presentation as iOS native .OverCurrentContext or .CurrentContext. I find no matter what I override, the presentingViewController is always the rootViewController of UIWindow, does anybody…
user3349433
  • 480
  • 2
  • 11
3
votes
0 answers

How to animate the frame of the presented view?

I need to adjust the frame of the presented view of a custom UIPresentationController using an animation when the keyboard becomes visible. Animations doesn't seem to work due to automatically added constraints. I tried to create an animation by…
Peter Combee
  • 595
  • 4
  • 10
3
votes
1 answer

UIPopoverPresentationController

I'm new to swift and trying to understand how to use UIPopoverPresentationController. What I need in my app is that when a button is pressed a popover from the button of the screen will be shown on with an xib file on half of the screen . What…
user2993422
  • 306
  • 2
  • 6
  • 22
3
votes
1 answer

Setting UIModalPresentationStyle for iPhone 6 Plus in landscape?

I want to always present a view controller in a popover on all devices and all orientations. I tried to accomplish this by adopting the UIPopoverPresentationControllerDelegate and setting the sourceView and sourceRect. The segue in the storyboard is…
Jordan H
  • 52,571
  • 37
  • 201
  • 351
3
votes
1 answer

transitionCoordinator return nil for custom container view controller in iOS8

when reference transitionCoordinator on child vc, it used to called transitionCoordinator on custom container class in iOS7, but in iOS8 this wasn't the case. Now it return nil and I have no clue what should I change to make this work. I guess its…
2
votes
1 answer

Inset contents underneath sheet presented with medium detent

iOS 15 added UISheetPresentationController which allows you to implement a half-height sheet by setting sheetPresentationController's detents to [.medium()]. You can then set the largestUndimmedDetentIdentifier to .medium to allow interacting with…
Jordan H
  • 52,571
  • 37
  • 201
  • 351
2
votes
0 answers

How to allow parent view's gestures to still work / not be disabled when using UIPresentationController? (Duplicating Apple Maps feature)

Trying to duplicate Apple Maps feature, with a bottom sheet overlay. I've been able create the custom UIPresentationController and get the bottom sheet to appear, but now the bottom sheet seems to be blocking all of the gestures of the…
2
votes
0 answers

Is something different in iOS 14 with the way transforms are handled during a custom view controller presentation?

As part of learning UIPresentationController (and its associated custom view controller presentation objects) I figured I'd recreate Apple's iOS 13 default modal presentation style. It worked well-enough on iOS 12 and 13, but on iOS 14 I get this…
okoroezenwa
  • 23
  • 1
  • 6
2
votes
2 answers

iOS 13 style UIPresentationController without relying on snapshots?

iOS 13 seems to use a new UIPresentationController for presenting modal view controllers, but one that does not rely on taking snapshots of the presenting view controller (as most / all libraries out there do). The presenting view controller is…
strangetimes
  • 4,953
  • 1
  • 34
  • 62
2
votes
1 answer

iOS: Presentation controller frame size changes on device orientation

How to keep the presentation controller height same on device orientation change. Below is the code: func presentationControllerForPresentedViewController(presented: UIViewController, presentingViewController presenting: UIViewController!,…
Ankur Prakash
  • 1,417
  • 4
  • 18
  • 31