Questions tagged [uisheetpresentationcontroller]

10 questions
7
votes
0 answers

UISheetPresentationController Underneath Tab Bar

I am trying to present a UIViewController within a UISheetPresentationController to have a permanent modal that sits below my UITabBarController exactly like how Apple has shown it possible in the "Find My" app: Reference Code: let…
2
votes
0 answers

How to dismiss UISheetPresentationController that is visible when app becomes sceneWillResignActive or sceneDidEnterBackground

I'm presenting a UISheetPresentationController as the following when a user taps on a gear icon. @IBAction func settings(_ sender: Any) { let storyboard = UIStoryboard(name: "Main", bundle: nil) let viewController =…
Paul S.
  • 1,342
  • 4
  • 22
  • 43
1
vote
0 answers

How to align the height of a custom detent with the content of a presented UISheetPresentationController in UIKit?

I am currently using the UISheetPresentationController in UIKit to show a sheet on top of a UIViewController to give additional information about the underlying UIViewController. The sheet will not block the interaction or dim the underlying…
1
vote
1 answer

How to get the height of the current detent of a UISheetPresentationController?

I am using the UISheetPresentationController in UIKit to present a UIViewController with the available default detents .medium and .large and with a custom smaller detent (with a height of around 100-120). This sheet will be presented on top of a…
1
vote
0 answers

how can we set custom detents for sheetPresentationController in iOS 15

from iOS 16 we can set custom detents in sheetPresentationController but is there any way or alternative to archive same thing in iOS 15 as well. if let sheet = objVC?.sheetPresentationController { if #available(iOS 16.0, *) { …
1
vote
0 answers

Swift dismiss UISheetPresentationController in compact height

I am using a UISheetPresentationController to show a bottom sheet in an iOS app. In compact height the sheet goes to fullScreen which is the desired behavior. However I cannot dismiss it without adding a custom dismiss button. Is there a default…
alionthego
  • 8,508
  • 9
  • 52
  • 125
0
votes
0 answers

objc - How to disable the present view bounces

I use the following code to present an NavigationController GridMenuViewController* vc = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"GridMenuViewControllerID"]; GridMenuNavigationController *nav =…
0
votes
1 answer

How to freeze detent / disable user interaction to prevent it from changing? in swift UIKit

I have a detent set in my VC, as a swip-panel on another ViewController (anotherVC) and in certain situations I want to freeze \ disable it from moving up and down... func viewDidLoad() { if let sheet = anotherVC.sheetPresentationController { …
0
votes
1 answer

iOS 16: Set Minimum Detent for sheetPresentationController

Is there a way in iOS 16's expanded UISheetPresentationController API to set a minimum detent height for a presented sheet? (i.e. such that it does not dismiss from the screen?) Example presentation code: let viewControllerToPresent =…
Jake Chasan
  • 6,290
  • 9
  • 44
  • 90
0
votes
1 answer

UISheetPresentationController displaying differently on different phones

I created a UIStoryboardSegue to make a "Bottom Sheet segue". Our designer shared a screenshot of the app on his phone and the bottom sheet is displaying differently, despite the fact we are both on the same iOS version. On mine and my simulator,…