NativeScript / nativescript-angular

Integrating NativeScript with Angular
http://docs.nativescript.org/angular/tutorial/ng-chapter-0
Apache License 2.0
1.21k stars 241 forks source link

Tabview not working correctly on ios #1173

Open bnbs opened 6 years ago

bnbs commented 6 years ago

This only happens on iOS 11. I tested on iOS 10, android and this error did not occur.

Code:

<GridLayout rows="50,*" columns="*">
    <TabView row="0" col="0" #tabview androidSelectedTabHighlightColor="#1e3d52" (selectedIndexChanged)="onSelectedIndexChanged($event)"
        actionBarTitle>
        <StackLayout *tabItem="{title: 'ABERTOS'}"></StackLayout>
        <StackLayout *tabItem="{title: 'SINCRONIZADOS'}"></StackLayout>
    </TabView>
    <StackLayout row="1" col="0" orientation="vertical" class="stacklayout-pedidos-backgroud" [formGroup]="form">
        <SearchBar formControlName="Pesquisa" class="searchbar-default" (loaded)="onSearchBarLoaded($event)"></SearchBar>
    </StackLayout>
</GridLayout>
captura de tela 2018-01-27 as 12 27 25 captura de tela 2018-01-27 as 12 27 43
tsonevn commented 6 years ago

Hi @bnbs, Thank you for reporting this issue, I tested it on my side and have to confirm that this is a real issue, which could be reproduced on iOS 11.
For further info, I would suggest keeping track on the issue.

yoat commented 5 years ago

I'm using NativeScript 5 on iOS 12.1 and there is a similar issue, perhaps related.

When you rotate from portrait to landscape the position of the top of the content in the tabview shifts down. This only occurs on the portrait-to-landscape transition, not the opposite. It also only affects the tab that is visible during the rotation. The end result is that rotating one tab then switching to another which have the tops of those tabs out of alignment.