Skip to content
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

Merged
merged 8 commits into from
Oct 7, 2020

Conversation

BenShutt
Copy link
Contributor

@BenShutt BenShutt commented Oct 7, 2020

Summary

After

  • Pushing 2 quiz questions
  • Quitting the quiz via the top right bar button

The navigationController would pop to the root UIViewController 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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@@ -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 =
Copy link
Contributor Author

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

Copy link
Contributor

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!

Copy link
Contributor Author

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()
Copy link
Contributor Author

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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dem docs tho! 👏🏻

Copy link
Contributor Author

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" 😂

Copy link
Contributor

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 =
Copy link
Contributor

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;
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep back merging :)

@BenShutt BenShutt merged commit b5293ab into develop Oct 7, 2020
@BenShutt BenShutt deleted the fix/quiz-hides-bottom-bar-when-pushed branch October 7, 2020 15:55
@BenShutt BenShutt mentioned this pull request Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants