You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do your libraries interfere with the device's screen rotation? The screen rotation lock feature works well, but when adding FURenderKit, it doesn't work on devices older than iOS 16.
Hear is my code
public static func lockToOrientation(newOrientation: UIInterfaceOrientation, using mask: UIInterfaceOrientationMask) {
instance.orientationMark = mask
if #available(iOS 16.0, *) {
if let windowScence = instance.getWindowScence() {
let windowScenceGeometry = UIWindowScene.GeometryPreferences.iOS(interfaceOrientations: mask)
windowScence.requestGeometryUpdate(windowScenceGeometry) { error in
print("Update Geometry error : \(error.localizedDescription)")
}
}
} else {
UIDevice.current.setValue(UIInterfaceOrientation.unknown.rawValue, forKey: "orientation")
UIDevice.current.setValue(newOrientation.rawValue, forKey: "orientation")
FURenderer.setDeviceOrientation(Int32(mask.toFUImageOrientation.rawValue))
}
UIViewController.attemptRotationToDeviceOrientation()
}
The text was updated successfully, but these errors were encountered:
Do your libraries interfere with the device's screen rotation? The screen rotation lock feature works well, but when adding FURenderKit, it doesn't work on devices older than iOS 16.
Hear is my code
The text was updated successfully, but these errors were encountered: