I'm going to get straight to the point. The below code adds two bar button items without a problem, however I was wondering how I can put a distance between these two bar button items? They are too close to each other, that's why I'm looking for a way to manually set their distance to each other. I'd appreciate any help! Thank you very much in advance!
let btnPlus = UIBarButtonItem()
btnPlus.title = "+"
btnPlus.setTitleTextAttributes([NSAttributedStringKey.font : UIFont(name: "Arial", size: 24)!], for: .normal)
btnPlus.setTitleTextAttributes([NSAttributedStringKey.font : UIFont(name: "Arial", size: 24)!], for: .selected)
btnPlus.target = self
btnPlus.action = #selector(OnbtnPlusTouched)
//btnPlus.setTitleTextAttributes([NSAttributedStringKey: UIFont(name: "Arial", size: 14)!], for: UIControlState.normal)
let btnRating = UIBarButtonItem()
btnRating.title = "Oy Ver"
btnRating.setTitleTextAttributes([NSAttributedStringKey.font : UIFont(name: "Arial", size: 24)!], for: .normal)
btnRating.setTitleTextAttributes([NSAttributedStringKey.font : UIFont(name: "Arial", size: 24)!], for: .selected)
btnRating.target = self
btnRating.action = #selector(OnbtnPlusTouched)
//btnPlus.setTitleTextAttributes([NSAttributedStringKey: UIFont(name: "Arial", size: 14)!], for: UIControlState.normal)
navigationItem.rightBarButtonItems = [btnPlus, btnRating]