-
Notifications
You must be signed in to change notification settings - Fork 0
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/quiz hides bottom bar when pushed #297
Conversation
Release/v3.0.3
…hidesBottomBarWhenPushed` is `true` for a viewController in the navigationController stack. Only hide bottom bar is this is not the case
…ionContainerViewController`. Now set this when pushing when appropriate
…troller` extension method
@@ -400,6 +400,8 @@ open class QuizQuestionContainerViewController: AccessibilityRefreshingViewContr | |||
quiz.currentIndex = quiz.currentIndex + 1 | |||
guard let questionViewController = quiz.questionViewController() as? QuizQuestionContainerViewController else { return } | |||
questionViewController.quiz = quiz | |||
questionViewController.hidesBottomBarWhenPushed = |
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.
I have not set this below on the quiz 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.
That seems correct, the completion won't need to hide the bottom bar because it's already hidden!
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.
Yeah, you'd safely assume a question came first 😋
@@ -320,7 +320,7 @@ public extension UINavigationController { | |||
|
|||
guard let _viewController = viewController else { return } | |||
|
|||
_viewController.hidesBottomBarWhenPushed = true | |||
_viewController.hidesBottomBarWhenPushed = shouldHideBottomBarWhenPushed() |
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.
NOTE: This is for all viewControllers pushed via a Storm link
/// `hidesBottomBarWhenPushed` to the `return` of this. | ||
/// This function checks to see if there is another `UIViewController` in the navigation | ||
/// controller stack (before the to be pushed) which has `hidesBottomBarWhenPushed = true` | ||
func shouldHideBottomBarWhenPushed() -> Bool { |
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.
Dem docs tho! 👏🏻
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.
🙇 Looking for those "Exceeding exceptions" 😂
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.
Haha so good!
@@ -400,6 +400,8 @@ open class QuizQuestionContainerViewController: AccessibilityRefreshingViewContr | |||
quiz.currentIndex = quiz.currentIndex + 1 | |||
guard let questionViewController = quiz.questionViewController() as? QuizQuestionContainerViewController else { return } | |||
questionViewController.quiz = quiz | |||
questionViewController.hidesBottomBarWhenPushed = |
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.
That seems correct, the completion won't need to hide the bottom bar because it's already hidden!
@@ -1860,7 +1860,7 @@ | |||
IPHONEOS_DEPLOYMENT_TARGET = 11.0; | |||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; | |||
LIBRARY_SEARCH_PATHS = "$(inherited)"; | |||
MARKETING_VERSION = 3.0.2; | |||
MARKETING_VERSION = 3.0.3; |
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.
3.0.3
is already out? Is this just from back-merging into your branch?
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.
Yep back merging :)
Summary
After
The
navigationController
would pop to the rootUIViewController
but the tab bar would not be there.For more detail see my docs on
shouldHideBottomBarWhenPushed()
Related Issue
https://3sidedcube.atlassian.net/browse/OU20-69
Motivation and Context
Bug fix
How Has This Been Tested?
Tested by running in ARC Emergency
Types of changes
Checklist: