Skip to content

Commit 139082d

Browse files
author
rmotygullin
committed
FixRotation: (Issues During Rotation) Fix Completed
1 parent 08975ba commit 139082d

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Example/ContainerControllerSwift/Maps/MapsViewController.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ class MapsViewController: StoryboardController, MapsContainerControllerDelegate,
105105

106106
@objc func rotated() {
107107

108-
let orint = UIDevice.current.orientation
109-
if orint == .faceUp || orint == .faceDown || orint == .portraitUpsideDown { return }
108+
if !UIDevice.current.orientation.isRotateAllowed { return }
110109

111110
updateMapViewTopPadding()
112111
}

Sources/ContainerController/ContainerController.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,7 @@ open class ContainerController: NSObject {
211211

212212
@objc func rotated() {
213213

214-
let orint = UIDevice.current.orientation
215-
if orint == .faceUp || orint == .faceDown || orint == .portraitUpsideDown { return }
214+
if !UIDevice.current.orientation.isRotateAllowed { return }
216215

217216
if ContainerDevice.orientation == oldOrientation { return }
218217
oldOrientation = ContainerDevice.orientation

0 commit comments

Comments
 (0)