Skip to content

[iOS] ScrollView does not layout properly when NavigationBar is not translucent #5855

Closed

Description

@vchimev

Tell us about the problem

When setting translucent property of NavigationBar to false and have ScrollView as direct child of Page, it is not layouted properly.

Which platform(s) does your issue occur on?

iOS

Please provide the following version numbers that your issue occurs with:

  • CLI: 4.0.0
  • Cross-platform modules: 4.0.0
  • Runtime: 4.0.0

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

<Page xmlns="http://schemas.nativescript.org/tns.xsd" backgroundColor="green">
    <Page.actionBar>
        <ActionBar title="My App" icon="" class="action-bar" flat="true" />
    </Page.actionBar>
    <ScrollView>
        <TextView text="Lorem ipsum" />
    </ScrollView>
</Page>

Actual Result

scrollview

Expected Result

ScrollView should be layouted just below the NavigationBar without a gap.

Workarounds

  • set page.scrollableContent = false;
    or
  • wrap ScrollView in GridLayout for example

Activity

  1. victorevox commented on Feb 1, 2019

    @victorevox

    Hi there, dont know if this issue I'm having is the same the one mentioned here but, after upgrading from NS4 to NS5 my flat action bar adds a gap.

    Before, in NS 4
    screenshot from 2019-02-01 14-47-56

    After, in NS5
    screenshot from 2019-02-01 15-00-00

    Do you know any workaround for this?

  2. MartoYankov commented on Feb 6, 2019

    @MartoYankov
    Contributor

    @victorevox Please, provide a code sample or a playground with your layout.

  3. self-assigned this
    on Feb 6, 2019
  4. ghost removed on Feb 6, 2019
  5. victorevox commented on Feb 6, 2019

    @victorevox

    @victorevox Please, provide a code sample or a playground with your layout.

    Hi @MartoYankov , thanks for checking, please see: https://play.nativescript.org/?template=play-ng&id=ZyeGeF&v=3

  6. lock commented on Feb 6, 2020

    @lock

    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.

  7. locked and limited conversation to collaborators on Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions