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?
It appears they have a very different aspect ration:
func is wide: like 70 * 44
gear is square : like 44 * 44
Hence, when drawing, they scale to fit ; and the height of function icon is reduced.
Maybe a solution is to create your own icon and make it square (entered in the square you want).
Update
I did it, creating a 40*40 icon and it works quite well.
I had a series of steps to get there :
- 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
Note: at step 8, you may fine tune the values (changing resolution, changing a little bit the size, but keep it square).