Contrary to this a normal custom image works just fine and I tried it in code and with the storyboard.
So my problem is that the position of some SFSymbols is not properly centred, is there a way to fix this?
- screenshot the icon
- pasted in drawing in openOffice
- screenshot a square around it (it has white background)
- pasted again in open office
- with Tools > Color replacer, change white color to transparent
- selected the object and copied
- in Preview, create from pasteboard
- resize to 40 * 40 and name "f of x"
- then copied in Xcode project
Could you give examples of some OK and some not OK ?some SFSymbols is not properly centred
function
gear
rectangle and pencil and ellipsis
square and arrow up
Code Block tabBarItem.imageInsets = UIEdgeInsets(top: 6, left: 0, bottom: -6, right: 0)
Code Block for tab in self.tabBarController!.tabBar.items! { tab.imageInsets = UIEdgeInsets(top: 6, left: 0, bottom: -6, right: 0) }
- screenshot the icon
- pasted in drawing in openOffice
- screenshot a square around it (it has white background)
- pasted again in open office
- with Tools > Color replacer, change white color to transparent
- selected the object and copied
- in Preview, create from pasteboard
- resize to 40 * 40 and name "f of x"
- then copied in Xcode project
What is not OK with an image ?creating my own image just didn't feel right
Yes, that's surprising.why the imageInsets do not work on UIImages that are initialized with an SFSymbol but do work when I use an image which is in an Assets folder.