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

[iOS] HeaderCenter positioned to the right on initial screen #571

Closed
kyle-ssg opened this issue Jul 20, 2020 · 4 comments
Closed

[iOS] HeaderCenter positioned to the right on initial screen #571

kyle-ssg opened this issue Jul 20, 2020 · 4 comments

Comments

@kyle-ssg
Copy link
Contributor

kyle-ssg commented Jul 20, 2020

image

Rendering an unstyled text element for headerCenter shows it is miss-aligned but only if the screen has no back button.

 const options: Partial<NativeStackNavigationOptions> = {
              headerCenter: ()=>    <ReactNative.Text>Loading</ReactNative.Text>,
        }

Replicated on iOS simulator SE 2nd Edition

@kyle-ssg kyle-ssg changed the title HeaderCenter positioned to the right HeaderCenter positioned to the right on initial screen Jul 20, 2020
@kyle-ssg kyle-ssg changed the title HeaderCenter positioned to the right on initial screen [iOS] HeaderCenter positioned to the right on initial screen Jul 20, 2020
@WoLewicki
Copy link
Member

It is probably the same issue as #432. There are problems with aligning header buttons on iOS and it seems like it is not too easy to resolve it.

@kyle-ssg
Copy link
Contributor Author

kyle-ssg commented Aug 6, 2020

Hmm I'm not 100% sure @WoLewicki, happy to trust judgment but this seems a little less random than the one mentioned there. This seems to be literally the centre view being padded left by the exact width of the back button?

@WoLewicki
Copy link
Member

Yeah, if you put a simple View in the headerCenter, it will misaligned too. It is mentioned in a comment #432 (comment).

@kyle-ssg
Copy link
Contributor Author

kyle-ssg commented Aug 6, 2020

Ah. This is quite a big issue then, should I close in favour of #432?

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

No branches or pull requests

2 participants