large navigation bar with right bar button issue

1.5k Views Asked by At

i am setting large title to navigation bar and then on right side i am adding two buttons but button not set to the center with large title my code is as below

Code

navigationController?.navigationBar.prefersLargeTitles = true
title = "Record"

let settingImage    = UIImage(named: "ic_Setting")!
let infoImage  = UIImage(named: "ic_Info")!

let settingButton   = UIBarButtonItem(image: settingImage,  style: .plain, target: self, action: nil)
let infoButton = UIBarButtonItem(image: infoImage,  style: .plain, target: self, action: nil)

navigationItem.rightBarButtonItems = [infoButton, settingButton]

i put above code inside viewDidLoad() and here is my screen shot which out put i am getting form above code and other screen shot which is my expected output

This is my output i get from above code:

This is my output i get from above code

I want output like this:

I want output like this

so please help me how to center buttons with title

0

There are 0 best solutions below