I can't use an SF Symbol as an asset for a tab bar icon.
I tried using the GUI to drag and drop the file. I'm unsure of how to add it programatically.
I expected to be able to drag/drop but it won't accept the .svg file. I add a new symbol set but that doesn't work as the tab bar icon asset.
To add a Tab Bar Controller to the Storyboard, select the 4 placeholders that we just created and the View Controller. Then, go to Editor, select Embed in and Tab Bar Controller. This will envelop all those scenes in a single Tab Bar Controller. Put the new Tab Bar Controller on top of the other controllers.
If you are using the new Xcode 11 beta, the new SF Symbols are already included and you do not need to import the .svg files.
Open your Storyboard file, click on the tab bar icon (not the one in the tab bar controller).
Now open the attributes inspector on the right hand side and open the combo box at "Bar Item" -> "Image". Now there will be the SF Symbols in this list as in the screenshot below.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With