Я хотел бы заставить мое приложение всегда оставаться полноценным, не позволяя пользователям изменения размера. /> Вот что я пробовал до сих пор: < /p>
Код: Выделить всё
if UIDevice.current.userInterfaceIdiom == .pad {
if let sizeRestrictions = windowScene.sizeRestrictions {
let screenSize = windowScene.screen.bounds.size
sizeRestrictions.minimumSize = screenSize
sizeRestrictions.maximumSize = screenSize
}
}
However, even with this, the user can still scale the app window down by about ~11%.
Example (iPad Pro 13" M4 simulator):
screenSize: (1032.0, 1376.0)
After scaling DOWN: {899, 1221} < /p>
Я также заметил, что WindowsCene (_: didupdateefficeceemetometry
Код: Выделить всё
func windowScene(
_ windowScene: UIWindowScene,
didUpdateEffectiveGeometry previousEffectiveGeometry: UIWindowScene.Geometry
) {
print(previousEffectiveGeometry.description)
//
}
Подробнее здесь: https://stackoverflow.com/questions/797 ... pad-ios-26
Мобильная версия