Update ColourOptionsController (11-inch Screen Support)

Adds Landscape Mode support for 11-inch iPad Devices. Color options didn’t originally support it in this orientation. so it’s good to give it native support and better accessibility of the menu.
This commit is contained in:
arichornlover 2024-04-28 20:38:57 -05:00 committed by GitHub
parent 09e7556d28
commit 482f758c15
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,10 +7,10 @@
@implementation ColourOptionsController
- (void)loadView {
[super loadView];
[super loadView];
self.title = @"Custom Theme Color";
UIBarButtonItem *closeButton = [[UIBarButtonItem alloc] initWithTitle:@"Close" style:UIBarButtonItemStylePlain target:self action:@selector(close)];
UIBarButtonItem *saveButton = [[UIBarButtonItem alloc] initWithTitle:@"Save" style:UIBarButtonItemStylePlain target:self action:@selector(save)];
self.navigationItem.rightBarButtonItems = @[closeButton, saveButton];
@ -28,7 +28,7 @@
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad && UIInterfaceOrientationIsLandscape(self.interfaceOrientation)) {
CGRect screenRect = [[UIScreen mainScreen] bounds];
CGFloat screenWidth = screenRect.size.width;
if (screenWidth > 1024) {
if (screenWidth == 1024 || screenWidth == 1112) {
self.view.transform = CGAffineTransformMakeScale(0.7, 0.7);
}
}