1

In my application I am using below code to add default navigation.

enter image description here

self.navigationController?.navigationBar.barStyle = UIBarStyle.default
self.navigationController?.navigationBar.backgroundColor = UIColor.clear
self.navigationController?.navigationBar.isTranslucent = false
self.navigationController?.navigationBar.barTintColor = // my color
self.navigationController?.navigationBar.tintColor = // my color
self.navigationController?.navigationBar.shadowImage = UIImage()

This code works fine till iOS 10. But in iOS 11 the back icon is not in the center.

I checked other similar issues regarding view title here and here but couldn't find any solution. Thanks.

Pooja
  • 2,417
  • 20
  • 39

1 Answers1

1

So I found this answer and I did the same.

Removing this line from AppDelegate works for me.

UIBarButtonItem.appearance().setBackButtonTitlePositionAdjustment (UIOffsetMake(0, -60), for: .default)
Pooja
  • 2,417
  • 20
  • 39