How to Horizontally Align Navigation Bar Button Items - Swift iOS

155 Views Asked by At

I have these two bar buttons in a navigation controller enter image description here

They're not exactly horizontally aligned and I'm not sure how to align them.

Here's the code I wrote for the bar button items.

navController.navigationItem.backBarButtonItem = UIBarButtonItem(title: "", style: 
.plain, target: nil, action: nil)

self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Skip", style: 
.plain, target: nil, action: nil)
self.navigationItem.rightBarButtonItem!.tintColor = .red
0

There are 0 best solutions below