visionOS: Don't use deprecated UI for scene placement
This commit is contained in:
parent
4500e9be27
commit
ec0509c645
|
@ -437,7 +437,11 @@ extension MenuActionProvider {
|
||||||
|
|
||||||
private func addOpenInNewWindow(actions: inout [UIAction], activity: @escaping @autoclosure () -> NSUserActivity) {
|
private func addOpenInNewWindow(actions: inout [UIAction], activity: @escaping @autoclosure () -> NSUserActivity) {
|
||||||
let options = UIWindowScene.ActivationRequestOptions()
|
let options = UIWindowScene.ActivationRequestOptions()
|
||||||
|
#if os(visionOS)
|
||||||
|
options.placement = .standard()
|
||||||
|
#else
|
||||||
options.preferredPresentationStyle = .automatic
|
options.preferredPresentationStyle = .automatic
|
||||||
|
#endif
|
||||||
actions.append(UIWindowScene.ActivationAction { (_) in
|
actions.append(UIWindowScene.ActivationAction { (_) in
|
||||||
let activity = activity()
|
let activity = activity()
|
||||||
activity.displaysAuxiliaryScene = true
|
activity.displaysAuxiliaryScene = true
|
||||||
|
|
Loading…
Reference in New Issue