Post

Replies

Boosts

Views

Activity

Reply to Allow Catalyst UIWindow resizable to smaller than default
As from this stackOverFlow question You need to add this code in App Delegate or Scene Delegate for swiftUI If you set sizeRestrictions.maximumSize and sizeRestrictions.minimumSize to the same value, the window will not be resizable. To do so, just call this in your application:didFinishLaunchingWithOptions method (if you're using UIKit): UIApplication.shared.connectedScenes.compactMap { $0 as? UIWindowScene }.forEach { windowScene in windowScene.sizeRestrictions?.minimumSize = CGSize(width: 480, height: 640) windowScene.sizeRestrictions?.maximumSize = CGSize(width: 480, height: 640) } Note: You need to run this in OSX 10.15 Beta 5 or later, otherwise it will crash
Feb ’22