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
53
votes
10 answers

Custom size for Modal View loaded with Form Sheet presentation

I'm trying to load a UIViewController in iPad with Form Sheet presentation. The problem is the size of this new view, i put the size values in the IBuilder but the modal view take a fixed value. Also i tried to make this in prepareForSegue like…
Fran Fox
  • 575
  • 1
  • 4
  • 5
40
votes
6 answers

Custom smaller Detents in UISheetPresentationController?

Apple has finally released an Apple Maps-style "bottom sheet" control in iOS 15 in 2021: UISheetPresentationController. This type of sheet natively supports "detents", the heights at which a sheet naturally rests. The default large() detent…
pkamb
  • 33,281
  • 23
  • 160
  • 191
31
votes
6 answers

UIPopoverPresentationController should have a non-nil sourceView or barButtonItem set before the presentation occurs on iOS 9

I'm trying to show a popup using a custom UIPopoverPresentationController class. But it crashes with the error() should have a non-nil sourceView or barButtonItem set before the presentation occurs. Below…
Francis F
  • 3,157
  • 3
  • 41
  • 79
21
votes
5 answers

Incorrect frame when dismissing modally presented view controller

I am presenting a UIViewController using a custom transition and a custom UIPresentationController. The view controller's view does not cover the entire screen, so the presenting view controller is still visible. Next, I present an instance of…
16
votes
1 answer

Adjust frame of presented view in UIPresentationController after presentation

I'm using a custom presentation controller to make something similar to UIAlertView. I want it to move up when the keyboard shows. In the UIKeyboardWillShowNotification handler, I'm grabbing the new keyboard frame, storing it in a property, and then…
Zev Eisenberg
  • 8,080
  • 5
  • 38
  • 82
15
votes
3 answers

Adaptive UIPresentationController Based on View Size

I'm moving over to UIPresentationController based presentations for my view controllers but have run into some confusion with the API. I have a custom sidebar style view controller presentation (similar to the LookInside WWDC 2014 demo code). This…
simeon
  • 4,466
  • 2
  • 38
  • 42
13
votes
1 answer

Why UIPresentationController's height is changed when present another controller?

I use UIPresentationController to show bottom tip. Sometimes the presentationController may present another controller. And When the presented controller is dismissed, the presentationController's height was changed. So why does it changed and how…
dowZhang
  • 470
  • 1
  • 3
  • 18
13
votes
2 answers

Swift - UITableView editActionsForRowAtIndexPath open UIPresentationController when click Edit

Hi is there any way to open an UIPresentationController when swipe left is triggered and it's click Edit ? func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]? { let…
Bogdan Bogdanov
  • 882
  • 11
  • 36
  • 79
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…
12
votes
2 answers

Why doesn't defining my view controller size with frameOfPresentedViewInContainerView make it that size?

I've been following this tutorial on implementing custom view controller transitions in iOS 8 with UIPresentationController, and so far it all makes sense, but I can't seem to get my view controller to be the right size. In that tutorial, they have…
Doug Smith
  • 29,668
  • 57
  • 204
  • 388
11
votes
3 answers

Replacing the UIWindow's rootViewController while using a transition, appears to be leaking

Environment iOS 9.2 Xcode 7.2 I'm looking to replace the UIWindow's rootViewController with an animation while also removing it from the view hierarchy as well. class FooViewController: UIViewController { } class LeakedViewController:…
qnoid
  • 2,346
  • 2
  • 26
  • 45
10
votes
0 answers

Use Auto-Layout with UIPresentationController

I'm subclassing UIPresentationController to create a custom presentation/transition of a pop up UIViewController. The popup view itself should be constrained in the frame of the presenting view controller. I could do it with manual frame…
10
votes
4 answers

Can I make a UIPresentationController have userInteractionEnabled on PresentingViewController?

I am building a custom GUI on a universal app for iPhone and iPad. On iPad it relies heavily on "sideViews" for utilities like content manipulation, detailInformation and the like (think of an advanced SplitView). From a visual point of view the new…
10
votes
1 answer

Mysterious crash when presenting a view controller using a custom UIPresentationController subclass

I'm experiencing a crash on iOS 8.1 (device and simulator) when attempting to do a custom presention a UIViewController with a custom UIPresentationController subclass. The exception raised prints the following to the console: *** Terminating app…
codeperson
  • 8,050
  • 5
  • 32
  • 51
8
votes
2 answers

Understanding crashlytics UIKit errors

I am having trouble understanding the UIKit crash reports that I am receiving: Is there a way of finding out what line of code caused this: Crashed: com.apple.main-thread 0 UIKit 0x195694264 __56-[UIPresentationController…
user2363025
  • 6,365
  • 19
  • 48
  • 89
1
2 3 4 5 6 7