Unable to override the default back button, it never shows custom ICON


#1

Hi,

I am facing two issue, every time I navigate to any page, navBar appears and I tried customizing it using the custom service, but it displays the default bar and then the below customized one will appear :frowning:

Below is the Code I am using :
var backBtn = new supersonic.ui.NavigationBarButton({
onTap: function() {
supersonic.ui.layers.pop();
},
styleId: “nav-menu”
});

    var searchBtn = new supersonic.ui.NavigationBarButton({
        onTap: function() {
            navigator.notification.alert('Searching!')
        },
        styleId: "nav-search"
    });

function generateNavbar(title) {
supersonic.ui.navigationBar.hide();
supersonic.ui.navigationBar.update({
title: title,
overrideBackButton: true,
buttons: {
left: [backBtn],
right: [searchBtn]
}
}).then(supersonic.ui.navigationBar.show());
}

Where the “nav-menu” style I kept in application.css, and Icon are in icons folder two level above the application.css folder.
Please suggest how to customize the nav bar which appears when switching the menu using super-navigate.

Thanks,


#2

Can you please repost this to forum.appgyver.com where the Steroids/Supersonic community can help you out? This board is dedicated to Composer support (https://composer2.appgyver.com). Thanks! :slight_smile: