Just like that (sorry for the height of the image, if you know how to fix that please edit this post)
Asked
Active
Viewed 65 times
0
-
It's just a different image. – Sweeper Mar 08 '21 at 11:11
-
You can use the same image as a template image (`image.withRenderingMode(.alwaysTemplate)`), and change the `tintColor` and `backgroundColor`: https://stackoverflow.com/a/41425847/1176162 – Yonat Mar 08 '21 at 11:50
-
@Yonat but then I don't have the nice rounded corners – אורי orihpt Mar 26 '21 at 16:52
-
Try `myButton.layer.cornerRadius = 5` – Yonat Mar 28 '21 at 16:37
-
@Yonat bar button is not a `UIView` subclass – אורי orihpt Apr 06 '21 at 15:04
-
Use `UIBarButtonItem(customView: myButton)` and set the corner radius of `myButton`. – Yonat Apr 07 '21 at 13:37