Skip to content

Commit

Permalink
Use sheet-presentation (#2394)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitschlag committed Nov 15, 2024
1 parent fccf510 commit cac12e4
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,15 @@ class ProxySettingsViewController: UITableViewController {
let proxyToShare = proxies[indexPath.row]
let shareProxyViewController = ShareProxyViewController(dcContext: dcContext, proxyUrlString: proxyToShare)

show(UINavigationController(rootViewController: shareProxyViewController), sender: self)
let navigationController = UINavigationController(rootViewController: shareProxyViewController)
if #available(iOS 15.0, *), let sheet = navigationController.sheetPresentationController {
sheet.detents = [.medium()]
sheet.preferredCornerRadius = 20

present(navigationController, animated: true)
} else {
show(navigationController, sender: self)
}
}

// MARK: - Notifications
Expand Down

0 comments on commit cac12e4

Please sign in to comment.