From 1259f6bf853b4724e34fe80aa875a1446c25695d Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Mon, 13 May 2024 20:00:55 -0500 Subject: [PATCH] Update ColourOptionsController2.m --- Sources/ColourOptionsController2.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/ColourOptionsController2.m b/Sources/ColourOptionsController2.m index 745d9cd..c673ec7 100644 --- a/Sources/ColourOptionsController2.m +++ b/Sources/ColourOptionsController2.m @@ -25,17 +25,17 @@ UIColor *color = [lcmUnarchiver decodeObjectForKey:NSKeyedArchiveRootObjectKey]; self.selectedColor = color; - if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad && UIInterfaceOrientationIsLandscape(self.interfaceOrientation)) { - CGFloat scale = MIN(self.view.bounds.size.width / 1024, self.view.bounds.size.height / 768); + if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { + CGFloat scale = MIN(self.view.bounds.size.width / 768, self.view.bounds.size.height / 1024); self.view.transform = CGAffineTransformMakeScale(scale, scale); } } - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id)coordinator { [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; - - if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { - CGFloat scale = MIN(size.width / 1024, size.height / 768); + + if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad && UIInterfaceOrientationIsLandscape(self.interfaceOrientation)) { + CGFloat scale = MIN(size.width / 768, size.height / 1024); [coordinator animateAlongsideTransition:^(id context) { self.view.transform = CGAffineTransformMakeScale(scale, scale); } completion:^(id context) {