Polish for Onboarding Carousel

Add dark mode assets and colours.
Improve layout for 12" iPad and 4" iPhone.
Move isLockedToPortraitOnPhone to RiotNavigationController.
This commit is contained in:
Doug
2022-01-17 17:37:59 +00:00
parent 8cc6644378
commit af0785b2bb
22 changed files with 2484 additions and 151 deletions
@@ -22,5 +22,17 @@
@interface RiotNavigationController : UINavigationController
/**
When `true` the presented view will have its orientation fixed to portrait on iPhone.
*/
@property (nonatomic) BOOL isLockedToPortraitOnPhone;
/**
Initializes and returns a newly created navigation controller that can be locked to
portrait when presented on iPhone.
@param isLockedToPortraitOnPhone Whether to lock interface to portrait on iPhone.
*/
- (instancetype)initWithIsLockedToPortraitOnPhone:(BOOL)isLockedToPortraitOnPhone;
@end
@@ -32,6 +32,11 @@
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
if (self.isLockedToPortraitOnPhone && UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPhone)
{
return UIInterfaceOrientationMaskPortrait;
}
if (self.topViewController)
{
return self.topViewController.supportedInterfaceOrientations;
@@ -67,4 +72,14 @@
[super pushViewController:viewController animated:animated];
}
- (instancetype)initWithIsLockedToPortraitOnPhone:(BOOL)isLockedToPortraitOnPhone
{
self = [super init];
if (self) {
self.isLockedToPortraitOnPhone = isLockedToPortraitOnPhone;
}
return self;
}
@end