Wallet: fixed QR scanner orientation on iPads

This commit is contained in:
Ilya Laktyushin 2019-10-04 15:31:07 +03:00
parent 354be3e424
commit 11a4d6d5f8
2 changed files with 4 additions and 8 deletions

View File

@ -613,7 +613,7 @@ final class SharedApplicationContext {
}, getAvailableAlternateIcons: {
if #available(iOS 10.3, *) {
var icons = [PresentationAppIcon(name: "Blue", imageName: "BlueIcon", isDefault: buildConfig.isAppStoreBuild),
PresentationAppIcon(name: "Black", imageName: "BlackIcon", isDefault: buildConfig.isInternalBuild),
PresentationAppIcon(name: "Black", imageName: "BlackIcon"),
PresentationAppIcon(name: "BlueClassic", imageName: "BlueClassicIcon"),
PresentationAppIcon(name: "BlackClassic", imageName: "BlackClassicIcon"),
PresentationAppIcon(name: "BlueFilled", imageName: "BlueFilledIcon"),

View File

@ -296,14 +296,10 @@ private final class WalletQrScanScreenNode: ViewControllerTracingNode, UIScrollV
let bounds = CGRect(origin: CGPoint(), size: layout.size)
if case .tablet = layout.deviceMetrics.type {
if case .landscape = layout.orientation {
let rotation: CGFloat
if UIDevice.current.orientation == .landscapeLeft {
rotation = CGFloat.pi / 2.0
} else {
rotation = -CGFloat.pi / 2.0
}
if UIDevice.current.orientation == .landscapeLeft {
self.previewNode.transform = CATransform3DMakeRotation(CGFloat.pi / 2.0, 0.0, 0.0, 1.0)
} else if UIDevice.current.orientation == .landscapeRight {
self.previewNode.transform = CATransform3DMakeRotation(-CGFloat.pi / 2.0, 0.0, 0.0, 1.0)
} else {
self.previewNode.transform = CATransform3DIdentity
}