Skip to content

fix(ios-action-bar): NavigationButton text change on first navigation #5458

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

Merged
merged 1 commit into from
Feb 28, 2018

Conversation

ADjenkov
Copy link
Contributor

The problem: NavigationButton (a.k.a back button) won't change its title on first navigation when there
is no transition animation - iOS 11+ only.

The solution: Set empty back button title on the parent view controller when navigating

For reference: stackoverflow1 and stackoverflow2

Fix #5169

@ADjenkov ADjenkov added this to the 4.0 milestone Feb 23, 2018
@ADjenkov ADjenkov self-assigned this Feb 23, 2018
@@ -86,6 +88,11 @@ export class Frame extends FrameBase {
backstackEntry[NAV_DEPTH] = navDepth;
viewController[ENTRY] = backstackEntry;

if (majorVersion > 10) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you pls add a comment in the code explaining why this is necessary, as the fix is not obvious :)

@ADjenkov ADjenkov force-pushed the djenkov/ios-back-button-text branch 2 times, most recently from 59e4651 to 14ce89f Compare February 23, 2018 14:54
@hshristov
Copy link
Contributor

@ADjenkov Won't this remove all back buttons?

@@ -86,6 +88,13 @@ export class Frame extends FrameBase {
backstackEntry[NAV_DEPTH] = navDepth;
viewController[ENTRY] = backstackEntry;

if (majorVersion > 10) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe extend condition to if (!animated && majorVersion > 10) ?

@ADjenkov ADjenkov force-pushed the djenkov/ios-back-button-text branch from 14ce89f to ee60214 Compare February 27, 2018 12:35
@SvetoslavTsenov
Copy link
Contributor

test

@ADjenkov ADjenkov merged commit b878143 into master Feb 28, 2018
@ADjenkov ADjenkov deleted the djenkov/ios-back-button-text branch February 28, 2018 13:36
@ghost ghost removed bug in progress labels Feb 28, 2018
@lock
Copy link

lock bot commented Aug 26, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Aug 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iOS: NavigationButton text
6 participants