Override back button's pop method of Nav Controller

I want to modify the transition time and direction of the the back button’s pop function as per the requirement. I could not find any such method to do it. If anyone has the solution to it then kindly provide the same.

Did you try this

 this.platform.registerBackButtonAction(() => {
     // override your back button
 });

I’ve already tried it, not working.