Post

Replies

Boosts

Views

Activity

Reply to 'UIScreen' is unavailable in visionOS, how to fix it? Is there anything to replace UIScreen?
My workaround for now, taking sidebar visibility into consideration. var screenWidth: Int? = nil if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene { if splitViewVisibility == .detailOnly { screenWidth = Int(windowScene.coordinateSpace.bounds.width) }else{ screenWidth = Int(windowScene.coordinateSpace.bounds.width) - 320 } }
Jan ’24