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
0
votes
2 answers

Difference between 2 adaptivePresentationStyle methods of the UIPopoverPresentationControllerDelegate protocol

I am using a popover view controller where I don't want the popover to cover the full screen (iOS 13). I was trying to use: func adaptivePresentationStyle(for controller: UIPresentationController) -> UIModalPresentationStyle { return…
0
votes
1 answer

UIPresentationController delegate how to set

In iOS 13, viewWillAppear is not called when dismissing view controller. As a workaround, it is mentioned to override UIAdaptivePresentationControllerDelegate delegate, but it's not working for me. What am I doing wrong? func prepare(for segue:…
Deepak Sharma
  • 5,577
  • 7
  • 55
  • 131
0
votes
1 answer

Connect programmatically created view to IB

Following this answer, I managed to add half-modally presented ViewControllerB to ViewControllerA. However, in the example, ViewControllerA is just a red view. I would like to connect it to IB in order to customize it. I tried creating a view…
Luke Redmore
  • 449
  • 3
  • 10
0
votes
1 answer

UIViewControllerTransitioningDelegate being deinitialized immediately after it is presented

I'm trying to present a view controller modally with a custom presenter using UIPresentationController (and UIViewControllerTransitioningDelegate). The problem is that the transitioning delegate is being deinitialized immediately after…
0
votes
0 answers

how do I stop presented view controller from getting dimissed

I am presenting a view controller programmatically but when the device is rotated it's getting auto-dismissed. I don't know why it happens and how do I fix it Here is the code UINavigationController* navC = blah blah. ViewContoller*…
0
votes
1 answer

Interactive sliding menu goes to completion as soon as pan gesture starts [Swift]

I am trying to implement a sliding menu that can be interactively dismissed by horizontal panning, same as the ones in Uber and Google apps. Everything works as expected except that, as soon as I start panning horizontally, dismiss goes to…
Jack Guo
  • 3,959
  • 8
  • 39
  • 60
0
votes
1 answer

UIPresentation controller - layout going wrong after coming back from background

I've implemented a custom transition from ViewController A (which is embedded in a UINavigationController) to ViewController B. The transition "slides" VC B from the bottom until it takes 1/2 the vertical screen size - using a custom…
Shai Ben-Tovim
  • 892
  • 8
  • 20
0
votes
1 answer

How to access my custom UIPresentationController from within presented controller?

This is how I perform transitioning: extension UIViewController: UIViewControllerTransitioningDelegate { public func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) ->…
Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358
0
votes
0 answers

behind the presentingViewController

I'm trying to do custom transitioning for modal view presentation using UIPresentationController, like below. I scaled my presenting view like the following (inside func presentingTransitionWillBegin()): self.presentingViewController.view.transform…
sCha
  • 1,454
  • 1
  • 12
  • 22
0
votes
2 answers

No visible @interface for UIPresentationController declares the selector initWithPresentingViewController:presentedViewController

I was watching WWDC 2014 video A Look Inside Presentation Controllers I downloaded the source code (written in Objective-C) for the session, try to build it and I got this error: No visible @interface for UIPresentationController declares the …
Oluwatobi Omotayo
  • 1,719
  • 14
  • 28
0
votes
1 answer

How to implement UIViewControllerTransitioningDelegate in UIStoryboardSegue?

This is what I do now: func presentOverlayController(controller: UIViewController) { controller.modalPresentationStyle = .Custom controller.transitioningDelegate = self presentViewController(controller, animated: true, completion:…
Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358
0
votes
1 answer

What's the need for UIPresentationController beside helping with trait collection in iOS?

What are the benefits of UIPresentationController over Just using adding subviews and animating the view you want to present in? It appears to be a little be cumbersome with all the protocol it must conform to and many people still prefer presenting…
irkinosor
  • 766
  • 12
  • 26
0
votes
1 answer

UIPopoverPresentationController on iPad

I want to present a viewController in UIPopoverPresentationController like iOS Setting App do when we choose language. It presents a viewController at center of device screen! But, my result is not like that! This is my code: func…
0
votes
3 answers

How to center label inside a subview with swift

I am trying to present a quote using a presented from the uipresentationcontroller api view but it is not working. What am I doing wrong? also, how do I resize the presented view dynamically to fit the text? Thanks. this is my code: override func…
irkinosor
  • 766
  • 12
  • 26
0
votes
2 answers

iOS 9: UIPresentationController::runTransitionForCurrentState is not called when home button is pressed

I'm a newbee in iOS development and would be really appreciative if anyone could help me with this problem. It seems that in iOS <= 8 UIPresentationController::runTransitionForCurrentState is called when home button is pressed but that doesn't…
yvetterowe
  • 1,239
  • 7
  • 20
  • 34