Реализация поддержки внешнего монитора в SwiftUIIOS

Программируем под IOS
Ответить
Anonymous
 Реализация поддержки внешнего монитора в SwiftUI

Сообщение Anonymous »


I'm confused about implementing external monitor support via Airplay with SwiftUI.

In SceneDelegate.swift I'm using UIScreen.didConnectNotification observer and it actually detects a new screen being attached but I'm unable to assign a custom UIScene to the screen.

I found a few good examples using Swift with iOS12 and lower, but none of them work in SwiftUI, since the whole paradigm has been changed to use UIScene instead of UIScreen. Here's the list:

https://www.bignerdranch.com/blog/addin ... usly-easy/

https://developer.apple.com/documentati ... ted_screen

https://www.swiftjectivec.com/supportin ... -displays/

Apple even spoke about it last year

Perhaps something changed and now there is a new way to do this properly. Moreover, setting UIWindow.screen = screen has been deprecated in iOS13.

Has anyone already tried implementing an external screen support with SwiftUI. Any help is much appreciated.


Источник: https://stackoverflow.com/questions/580 ... in-swiftui
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «IOS»