How do I set a weight to SF Symbols for iOS 13?
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.
Introduction
On iOS 13, you set SF Symbol weight through UIImage.SymbolConfiguration. SF Symbols are treated like typographic glyphs, so weight, scale, and point size are configured as part of the symbol image configuration rather than by editing the vector asset manually.
The Basic API
The normal pattern is:
- create a system symbol image
- create a symbol configuration with the desired weight
- apply that configuration to the image
That works on iOS 13 and later for supported symbols.
Set Size and Weight Together
In most UI code, you want point size and weight as one package so the symbol matches nearby text.
This is often the cleanest form because the image is created with the desired configuration immediately.
Applying to an Image View
The weight controls the symbol stroke style. The tint color controls the rendered color when the symbol uses template rendering.
Matching Text Weight
A useful pattern is to align the symbol with a font.
This is especially helpful in buttons, labels with attachments, or navigation items where visual consistency matters more than hard-coded icon values.
Combining Configurations
You can also combine symbol configuration values.
That is useful when one piece of code controls size and another controls styling.
Watch for Symbol Availability
The API for symbol configuration exists on iOS 13, but not every SF Symbol name is available on every OS release. If a symbol was introduced later, UIImage(systemName:) returns nil on older systems.
A safe pattern is:
So if your issue is "weight does nothing," first make sure the symbol itself exists and the image is not nil.
Weight Is Not Tint and Not Font Weight on the View
A common misunderstanding is trying to make a symbol look bolder by changing only tint color or by changing the font on an unrelated control. SF Symbol weight is part of the image configuration itself.
This means the correct place to set it is the symbol configuration, not a random property on UIImageView.
Common Pitfalls
The biggest mistake is assuming iOS 13 lacks symbol weight support. The configuration API is available there.
Another mistake is setting a configuration but not actually applying it to the image being displayed.
A third issue is using a symbol name that does not exist on the iOS version you are testing, which makes it look like weight configuration failed when the image is actually nil.
Finally, do not confuse weight with scale. small, medium, and large scale affect overall symbol proportion, while weight affects stroke thickness.
Summary
- On iOS 13, set SF Symbol weight with
UIImage.SymbolConfiguration. - You can configure weight alone or combine it with point size or font.
- Apply the configuration either during image creation or with
applyingSymbolConfiguration. - Make sure the symbol name exists on the iOS version you are targeting.
- Weight, scale, and tint are separate concerns.
- Most problems come from not applying the configuration or from using an unavailable symbol.
Related reading
- How do I Set Background image in Flutter?
- How do I Set Background image in Flutter?
- How do I set bold and italic on UILabel of iPhone/iPad?
- How do I set bold and italic on UILabel of iPhone/iPad?
- How do I set the height of tableHeaderView UITableView with autolayout?
- How do I set the size of a SF Symbol in SwiftUI?
- How do I set up a simple delegate to communicate between two view controllers?
- How do I set up IntelliJ IDEA for Android applications?
.png&w=3840&q=75)
Tackling System Design Interview Problems
A short course that equips you with the skills to approach system design interviews methodically.
Start the free courseNo course covers this one yet
Basis Lab writes one for you from a sentence about what you want to be able to do, then teaches it and checks you understood. Your first course is free.
Build my courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.