How to navigate specific page, when click back button on navbar in ios

I am try to navigate the page when pressed the back button of navbar for ios and android.

I tried below code, but it works with android hardware button only.

    constructor(public navCtrl: NavController, public navParams: NavParams, private viewCtrl:ViewController, private platformCtrl:Platform) {

     platformCtrl.registerBackButtonAction(() => {
     this.navCtrl.setRoot(SettingsPage);
     });

     }

I tried this also but this are not forking

   backButtonClick(){
   console.log('back clicked');
   }
  backButtonAction(){
   console.log('back clicked');
  }

can any one please help me how to listen back button click