-
-
Notifications
You must be signed in to change notification settings - Fork 518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix user interface style in native stack view controllers #481
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -285,6 +285,12 @@ - (void)setModalViewControllers:(NSArray<UIViewController *> *)controllers | |
for (NSUInteger i = changeRootIndex; i < controllers.count; i++) { | ||
UIViewController *next = controllers[i]; | ||
BOOL lastModal = (i == controllers.count - 1); | ||
|
||
if (@available(iOS 13.0, *)) { | ||
// Inherit UI style from its parent - solves an issue with incorrect style being applied to some UIKit views like date picker or segmented control. | ||
next.overrideUserInterfaceStyle = previous.overrideUserInterfaceStyle; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this should make any difference in your case but I think it'd be more intuitive if presented controllers would inherit styles from their container and not from the sibling modal. If so I'd copy the property from |
||
} | ||
|
||
[previous presentViewController:next | ||
animated:lastModal | ||
completion:^{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also does not matter I think as soon appstore will stop accepting builds made with prev versions of xcode (if that isn't the case already) but for consistency can we add
#ifdef __IPHONE_13_0
to wrap this call much like we do in other cases where we do version checks