mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-01-11 22:40:19 +00:00
Added Landscape Support (ColourOptionsController.m)
Landscape Mode Support for iPad Pro 12.9 devices. this should look better when in Landscape Mode now. the size it originally had was the same exact size from Portrait Mode. which made this harder to use in some areas when used in Landscape. Hopefully this is solved.
This commit is contained in:
parent
30569fee6b
commit
f855e63f8e
1 changed files with 10 additions and 1 deletions
|
|
@ -9,7 +9,7 @@
|
|||
- (void)loadView {
|
||||
[super loadView];
|
||||
|
||||
self.title = @"Theme Custom Color";
|
||||
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)];
|
||||
|
|
@ -24,10 +24,19 @@
|
|||
[unarchiver setRequiresSecureCoding:NO];
|
||||
UIColor *color = [unarchiver decodeObjectForKey:NSKeyedArchiveRootObjectKey];
|
||||
self.selectedColor = color;
|
||||
|
||||
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad && UIInterfaceOrientationIsLandscape(self.interfaceOrientation)) {
|
||||
CGRect screenRect = [[UIScreen mainScreen] bounds];
|
||||
CGFloat screenWidth = screenRect.size.width;
|
||||
if (screenWidth > 1024) {
|
||||
self.view.transform = CGAffineTransformMakeScale(0.7, 0.7);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection {
|
||||
[super traitCollectionDidChange:previousTraitCollection];
|
||||
[self loadView];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
Loading…
Reference in a new issue