Hide back arrow on ios


#1

how can i hide or disable navigation back arrow on ios? i want to creater my custom back button


#2

I want this too :slight_smile: But without clearing history. This is my global function used to navigate, but when i turn clearHistory=true, back button will be hidden, but then i think im loosing option to use goBack() function.

global.goToPage = function(page,effect,clear=false) {
    var frameModule = require('ui/frame');
    var destination = page;
    var topmost = frameModule.topmost();

    var navigationEntry = {
        moduleName: destination,
        clearHistory: clear,
        backstackVisible: true,
        transition: {
            name:effect,
        }
    };
    topmost.navigate(navigationEntry);
};

#3

yes i’m talking about to do it without clearing history


#4

You can try:
<NavigationButton visibility="hidden" ></NavigationButton>

or

<Page xmlns="http://www.nativescript.org/tns.xsd" navigatedTo="navigatedTo">
   <Page.actionBar>
       <ActionBar title="Bla Bla" icon="">
           <NavigationButton text="Back" />
           
       </ActionBar>
   </Page.actionBar>
    <StackLayout>
        <Label text="Second page" textWrap="true" />
        
    </StackLayout>
</Page>
import { Page } from "ui/page"
import { EventData } from "data/observable";
import { topmost } from "ui/frame";
import { isIOS } from "platform";

export function navigatedTo(args){
    if(isIOS){
        let page:Page = <Page>args.object;
            let navigationBar = page.actionBar.ios;
            navigationBar.topItem.hidesBackButton = true;
    }
   
}