Hello everyone,
I've been having a bit of trouble with the .symbolRenderingMode(_:) modifier.
When trying to apply it to a single button in a toolbar, it does not work at all. The symbol is always rendered as monochrome.
However, I've realised that with this little hack I can achieve the expected results, but this is not ideal.
.toolbar {
HStack {
Button("", action: {}) // The hack
Button("Button", systemImage: "line.3.horizontal.decrease.circle.fill", action: {})
.symbolRenderingMode(.hierarchical)
.foregroundStyle(.blue)
}
}
I've submitted a bug report (FB16129223) but in the meantime, is this my only solution ?
Side note: the foregroundStyle(_:) modifier is ignored as well.
SF Symbols
RSS for tagEnhance your app with a set of symbols that integrate seamlessly with the San Francisco system font.
Posts under SF Symbols tag
44 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Hello, I have the following code:
struct SettingsButton: View {
var action: () -> Void
@State private var rotate: Bool = false
var body: some View {
Button(action: {
rotate.toggle()
action()
}, label: {
Image(systemName: "gearshape")
})
.symbolEffect(.rotate, value: rotate)
}
}
For some reason, my button is not rotating. Other effects such as pulse and bounce work as expected. I applied the .clockwise direction thinking it needed a direction set, but that didn't work either. I also tried using the symbolEffect with isActive, and that didn't work. Lastly, I thought there may be an issue with Xcode so I closed that and reopened, but still not working.
Any ideas?
How to do content transition when one image is a system symbol and the other is in assets catalouge?
I have a save button:
Button(action: {
saveTapped()
}) {
Label("Save", systemImage: wasSaved ? "checkmark" : "square.and.arrow.down")
}
.contentTransition(.symbolEffect(.replace))
.disabled(wasSaved)
Now, I created a new custom icon and added it into the assets catalogue: "custom.square.and.arrow.down.badge.checkmark" for when the wasSaved state is true. The issue I am facing is that to use it I need to use the method of Label with image:, while to use the non custom symbol, I need to use systemImage:.
So how is it possible to transition between the two?
Is there one in SF Symbols? I couldn't find one.
If not, how do I open an enhancement ticket to request one be added?
Thank you all in advance.
why do I need to set the font of an image of an SF symbol to get the effect to work? This should be a bug, it's bad behavior. Xcode 16.1 iOS 18.1, so frustrating.
for example: this works
Image(systemName: "arrow.trianglehead.2.clockwise.rotate.90.circle.fill")
.symbolEffect(.rotate, options: .repeat(.continuous), value: isActive)
.font(.largeTitle)
.onAppear() {
isActive = true
}
but this does not animate, which makes no sense
Image(systemName: "arrow.trianglehead.2.clockwise.rotate.90.circle.fill")
.symbolEffect(.rotate, options: .repeat(.continuous), value: isActive)
.onAppear() {
isActive = true
}
its the same if you use a simple setup and different font size, and whether font is before or after the symbol effect
Image(systemName: "arrow.trianglehead.2.clockwise.rotate.90.circle.fill")
.font(.headline) // only works if this line is here
.symbolEffect(.rotate, options: .repeat(.continuous))
I have some difficulties to recreate the same SF Symbols I have configure in the app into my code. Is there a way to copy not just the name but everything including all modifier.
Thank you
When I was on the 15.1 developer beta, I downloaded the beta version of the SF Symbols app. It worked perfectly throughout the beta, but when 15.1 was released, I downloaded the stable version of SF Symbols as well and removed the beta version. However, now when it launches I am greeted by an alert titled "Fonts need by this application are missing." It goes on to say that fonts may not display properly... etc, but I haven't noticed any issues viewing any symbols I have looked up, and they seem to show up properly when I define them in Xcode. I tried uninstalling and reinstalling the application, as well as following the advice in the alert by downloading "the latest fonts from the Apple Developer website." but the alert still shows up everytime I launch SF Symbols.
Any one else experiencing this issue or know of a way to solve it? It's not that big of an issue, it's just one extra click after all, but in case it might be in the future, I just thought I'd check with others.
Thanks!
I like this font. but in license only allowed for use in Mockup UI.
Feel free to use in commercial?
https://mobbin.com/apps/bloom-ios-e1251835-34e6-426e-9f94-f9595f2567fa/1c919e9a-d144-4aa0-b788-f9752111e281/screens
Hi,
I recently updated my app to swift 6, ios 18, xcode 16.
I now have always a warning like "CoreSVG has logged an error. Set environment variabe "CORESVG_VERBOSE" to learn more." if I use an SF image with a multicolor renderingmode. I have this on labels, image, ... If I change the rendering to palette or something else the warning is gone.
For the rest, the multicolor rendering is fine because the result is ok.
Can this warning be solved?
PS: This happens on device and simulator
I'm trying to download version 2.1 of SF symbols even though version 6 is out because I have a older macOS but I can't find it. So, how would I work around this?
I am trying to figure out how to set a button's label icon to match the button style when inside a list.
These four buttons display differently depending on context – if put inside a List or a VStack:
Button(role: .destructive) {} label: {
Label("Test", systemImage: "figure")
}.buttonStyle(.automatic)
Button(role: .destructive) {} label: {
Label("Test", systemImage: "figure")
}.buttonStyle(.bordered)
Button {} label: {
Label("Test", systemImage: "figure")
}.buttonStyle(.borderedProminent)
Button(role: .destructive) {} label: {
Label("Test", systemImage: "figure")
}.buttonStyle(.borderedProminent)
Inside a List, which looks weird in my opinion.
For reference, this is what they look like inside a VStack, which is what I'd expect:
I am not sure if this is intentional or a bug. If there are any workaround which do not explicitly set a specific color, like .foreground(.red), please let me know.
I have created a custom logo in the SFSymbols 6.1 app and exported it as SVG.
clock.arrow.trianglehead.clockwise.rotate.90.svg
The icon consists of two layers and I want them to animate by layer. This works for the wiggle effect (the two layers are moving independently), but not for the rotate effect (the logo moves as a whole). Why? This is my code:
let imageView = UIImageView()
imageView.preferredSymbolConfiguration = UIImage.SymbolConfiguration(scale: .large)
imageView.image = UIImage(named: "clock.arrow.trianglehead.clockwise.rotate.90", in: nil, with: nil)
imageView.translatesAutoresizingMaskIntoConstraints = false
let imageView2 = UIImageView()
imageView2.preferredSymbolConfiguration = UIImage.SymbolConfiguration(scale: .large)
imageView2.image = UIImage(named: "clock.arrow.trianglehead.clockwise.rotate.90", in: nil, with: nil)
imageView2.translatesAutoresizingMaskIntoConstraints = false
imageView.addSymbolEffect(.rotate.byLayer, options: .repeat(.continuous));
imageView2.addSymbolEffect(.wiggle.byLayer, options: .repeat(.continuous));
view.addSubview(imageView)
view.addSubview(imageView2)
NSLayoutConstraint.activate([
imageView.centerXAnchor.constraint(equalTo: view.centerXAnchor),
imageView.centerYAnchor.constraint(equalTo: view.centerYAnchor),
imageView2.centerXAnchor.constraint(equalTo: view.centerXAnchor),
imageView2.topAnchor.constraint(equalTo: imageView.bottomAnchor, constant: 40),
])
The following icon has been introduced in Safari's address bar for iOS 18:
I’d like to use it in my app to guide users on how to enable my Safari extension, but I couldn’t find it in SF Symbols beta 6.0 (99).
Is this because it’s still in beta and will be available for third-party use later, or is it a private icon that only Apple can use? I hope I just overlooked something.
Hello.
Icon fonts such as Font Awesome 6 and react-native-vector-icons are being rejected submission with the automated Invalid Binary error.
ITMS-90853: Invalid font - There was an error validating the font named 'FontAwesome6Free-Solid' at 'private-app-name/FontAwesome6_Solid.ttf'. ‘glyf’ table instructions.
These fonts have previously worked over the course of the last 3 years without issue and just stopped working on Monday. GitHub is filled with related issues and bug reports. This is likely affecting thousands of apps.
When a widget is using the new tinted mode in iOS 18 the Weather app shows the SF Symbols in both white and the tint color. For example, a tinted sun with a white arrow for sunrise.
I can't figure out how to do this. If I add widgetAccentable to the Image(systemName:) the entire Image becomes the tint color.
If I don't use it no combination of rendering mode or foreground style makes the tint color appear.
I can't find any mention of this in the WWDC sessions.
Hello,
I'm using the custom symbol feature in the official SF Symbols app. I'm wondering if there is a way to sync my custom symbols across different devices? Since I have multiple Macs to work on, maybe iCloud?
Hello, we're observing a strange issue with SF Symbols. We do the following steps:
Select a rather basic symbol like paintpalette.fill
Duplicate it as Custom Symbol
Select resulting Custom symbol, Combine Symbol with Component, combine it with one of the enclosures, square.fill
Export resulting Combined Symbol as a Symbol (we select XCode 15, but selecting XCode 14 or lower usually doesn't have any effect)
Import this asset into XCode
Immediately we see the first problem: with 'Automatic' render option, XCode renders it as a black square. To render it in XCode we need to select 'Template' / 'Multicolor' / 'Hierarchical'.
More, when we use that icon in the app, it is rendered OK in iOS 17.5.1 on both iPhones and iPads, but on lower iOS versions (15.8.2, 16.7.8) it is rendered as simply a colored square.
Now, naturally, we suspect that this has to do with symbols availability for different iOS versions, but that particular paintpallette.fill is available in iOS 16.0+ in all forms, so that would explain why it doesn't work on iOS 15, but not in iOS 16.
Moreover, we observe similar results with fully custom symbols entirely designed by us when used with components: importing a fully custom symbol and combining it with component (square) sometimes results in just a square rendered in older versions of iOS, so we sometimes get symbols working in all versions (15.8.2, 16.7.8, 17.5.1), and sometimes they are corretly rendered only in 17.5.1.
On older versions it usually looks like this:
What are we doing wrong?
Hi,
When putting an image that uses systemName next to a text will they be baseline aligned by default ?
--
Kindest Regards
Hi,
When watching SF Symbols WWDC videos about SF Symbols the recommendations is always to center align them, but suppose we are making sidebar menu items where we have VStack of HStacks , and each Stack have an SF Symbol and a text in this case how can SF Symbols be center aligned ? they will mostly right aligned so will this damage the design ? specially if they have like badges ?
--
Kind Regards
The SF Symbols app 6.0 (99) does not export the ‘Can Rotate’ property of layers when exporting a symbol via File > Export Symbol.
Without this, all the new fantastic edit functions in the app related to rotating in SF Symbols is completely useless.
This issue with the SF Symbols 6 app can be reproduced by exporting a rotatable symbol like fan.desk, and then by importing the result as custom symbol. When inspecting ‘Group 1’ of the imported symbol, it is no longer marked as rotatable.
SF Symbols app 6.0 is still in beta, but hasn't been updated since 10 June. Hopefully this bug will be solved in the release version, or earlier.
Does anyone know how to manually add the missing rotation info to the exported SVG file?
In case an Apple engineer reads this: FB13916635