Title image view position is changing while changing the tab in BubbleTabBarController. BubbleTabBarController
I have used following code to set the title view in navigation bar.
func setOtherNavigation(){
let navBar = self.navigationController!.navigationBar
let standardAppearance = UINavigationBarAppearance()
standardAppearance.configureWithOpaqueBackground()
standardAppearance.backgroundImage = UIImage(named: "top_bar")
let compactAppearance = standardAppearance.copy()
compactAppearance.backgroundImage = UIImage(named: "top_bar")
navBar.standardAppearance = standardAppearance
navBar.scrollEdgeAppearance = standardAppearance
navBar.compactAppearance = compactAppearance
let imgLogo = UIImageView(frame: CGRect(x: 0, y: 0, width: 200 , height: 40))
imgLogo.contentMode = .scaleAspectFit
let imageLogo = UIImage(named: "logo")
imgLogo.image = imageLogo
self.navigationItem.titleView = imgLogo
}
Everything seems good at home tab bar. when I change the tab from home to category tab, it is the title image view moving little right from centre horizontal position. I don't know why it is happening. Any one know?