Ok I watched the https://youtu.be/AVY1PXGqBN0 video for handling image assets, but I'm not comfortable clicking/dropping images.
I used to use UIImage(name: "nameOfImage") for simplicity. But now that I've learned that its returning an optional value I'm using UIImage(imageLiteralResourceName: "nameOfImage"). Brian if you have time, can you tell me if this is ok, or do I have to start using the image method in this video https://youtu.be/AVY1PXGqBN0.
My code for the navBar Button:
navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(imageLiteralResourceName: "plus").withRenderingMode(.alwaysOriginal), style: .plain, target: self, action: #selector(handleAddCompany))
OR if I want to call the image multiple times I use this.
let rightPlusButton : UIImage = {
let Plus = UIImage(imageLiteralResourceName: "plus")
return Plus
}()
navigationItem.rightBarButtonItem = UIBarButtonItem(image: rightPlusButton.withRenderingMode(.alwaysOriginal), style: .plain, target: self, action: #selector(handleAddCompany))