mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-23 01:52:44 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user