Thanks to visit codestin.com
Credit goes to github.com

Skip to content

iOS 14 navbar large title issue #9046

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

Closed
georgemark0v opened this issue Nov 17, 2020 · 4 comments · Fixed by #10694
Closed

iOS 14 navbar large title issue #9046

georgemark0v opened this issue Nov 17, 2020 · 4 comments · Fixed by #10694

Comments

@georgemark0v
Copy link

georgemark0v commented Nov 17, 2020

"devDependencies": {
    "@babel/core": "^7.11.6",
    "@babel/preset-env": "^7.11.5",
    "@nativescript/ios": "7.0.5",
    "@nativescript/webpack": "^3.0.4",
    "babel-loader": "^8.1.0",
    "nativescript-vue-template-compiler": "^2.8.1",
    "nativescript-worker-loader": "^0.12.1",
    "sass": "^1.26.10",
    "vue-loader": "^15.9.3"
  }

On iOS 14 devices no longer can't use large navbar titles and collapsed searchcontroller. When scrolled up large title doesn't show and listview scrolls back. After some retries large title finally shown.

<Page @loaded="pageDidLoad" class="page-clean-color">
  <ActionBar title="Контакты"></ActionBar>
  <ListView :items="contacts.listOf" @loaded="listViewDidLoad" height="100%" @itemLoading="itemLoading">
    <v-template></v-template>
  </ListView>
</Page>

Video example: https://yadi.sk/i/zbNO5nOwvjhyzQ

@georgemark0v georgemark0v changed the title iOS 14 layout issue iOS 14 issue Nov 17, 2020
@georgemark0v georgemark0v changed the title iOS 14 issue iOS 14 navbar large title and searchController issue Nov 17, 2020
@georgemark0v georgemark0v changed the title iOS 14 navbar large title and searchController issue iOS 14 navbar large title issue Nov 17, 2020
@rigor789
Copy link
Member

Please share your pageDidLoad and listViewDidLoad methods, maybe related to the issue.

@georgemark0v
Copy link
Author

georgemark0v commented Nov 17, 2020

Please share your pageDidLoad and listViewDidLoad methods, maybe related to the issue.

im sure problem not it

listViewDidLoad( args ) {
                args.object.ios.separatorInset = UIEdgeInsetsMake( 0, 68, 0, 0 );
                args.object.ios.keyboardDismissMode = UIScrollViewKeyboardDismissModeInteractive;   
            },
pageDidLoad(args) {                
                const page = args.object;
                if( this.people.items.getNoOfSections() > 0) {                          
                    this.contacts.prepare();
                    return;
                }
                               
                this.contacts.requests.get().then(() => {});

                this.contacts.listOf.addSection("", [
                    { type: 'location'  },
                    { type: 'invite' },
                    { type: 'requests' }
                ]);

                if( args.object.ios ) {
                    dispatch_async(dispatch_get_current_queue(), () => {
                        this.getContacts( args );
                    });
                }
}

@georgemark0v
Copy link
Author

Made some experiments and when listview have content size smaller then screen size its works as expected. https://yadi.sk/i/1FWwsLrHZW_Erg

@jerrykeys
Copy link

I can confirm this behaviour on both {N}6.5.21 and {N}7.0.13 with NativeScript Angular.

<ActionBar
        S2LargeTitle
        title="Entries">
</ActionBar>

<ListView
        [items]="logs">
    <ng-template let-item="item">
        <ns-log-entry-list-item [log]="item"></ns-log-entry-list-item>
    </ng-template>
</ListView>

The large title directive runs

private setLargeTitles() {
   if (this.actionBar.ios) {
     const navigationBar: UINavigationBar = this.actionBar.ios;
     navigationBar.prefersLargeTitles = true;
     navigationBar.sizeToFit();
   }
 }

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

Successfully merging a pull request may close this issue.

3 participants