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 navigationController = UINavigationController(rootViewController: UIViewController());
navigationController.modalPresentationStyle = .formSheet;
if let sheet = navigationController.sheetPresentationController {
sheet.detents = [.medium(), .large()];
sheet.prefersGrabberVisible = true;
sheet.largestUndimmedDetentIdentifier = .medium;
sheet.prefersScrollingExpandsWhenScrolledToEdge = false;
}
present(navigationController, animated: true);
This post: UISheetPresentationController with a tabBar poses a similar question but does not have any answers.