admin管理员组

文章数量:1123147

How can I add a right bar button image to view controller inside a navigation controller.

I tried

let image = UIImage(named: "save") // Use your custom image or SF Symbols
let button = UIBarButtonItem(image: image, style: .plain, target: self, action: #selector(addToLibraryTapped))
navigationItem.rightBarButtonItem = button

but it does the following attached

I need the button to be smaller and to be to the far right. how can I do this?

本文标签: iosHow to add a right bar button to navigation controllerStack Overflow