Update ColourOptionsController2.m

This commit is contained in:
arichornlover 2024-05-13 20:00:55 -05:00 committed by GitHub
parent 7ec8272d5f
commit 1259f6bf85
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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<UIViewControllerTransitionCoordinator>)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<UIViewControllerTransitionCoordinatorContext> context) {
self.view.transform = CGAffineTransformMakeScale(scale, scale);
} completion:^(id<UIViewControllerTransitionCoordinatorContext> context) {