Skip to content

iOS Layout issues using Label with maxLines #25

@felixkrautschuk

Description

@felixkrautschuk

When using a Label with maxLines inside a pager's item, we see some layout issues on iOS. Sometimes, the Label's content is trimed to one line, even though it should be shown within two lines. And sometimes the Label is shown with a margin on the top.

Bildschirmaufnahme.2022-09-13.um.11.32.33.mov
<StackLayout className="pager-container">
        <Label text="My items" className="pager-header-title"/>

        <pager:Pager items="{{ items }}" className="pager">
            <pager:Pager.itemTemplate>
                <GridLayout rows="*" className="pager-item-outer">
                    <StackLayout row="0" padding="15">
                        <Label text="{{ title }}" maxLines="2" className="pager-item-title"/>
                        <!--<Label text="{{ subtitle }}" maxLines="2" className="pager-item-subtitle" marginTop="5"/>-->
                    </StackLayout>
                </GridLayout>
            </pager:Pager.itemTemplate>
        </pager:Pager>
</StackLayout>

Demo app to reproduce:
ns-ios-pager-issue.zip

We are thankful for any feedback!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions