Change the stroke/fill color of SF Symbol icon in SwiftUI?

You can change the stroke and fill color of a sf symbol icon using foregroundColor(_ color: Color?) The following code: Image(systemName: “flame.fill”).foregroundColor(.red) Image(systemName: “flame”).foregroundColor(.red) Should produce this: Here is the complete SwiftUI View Code struct Icon : View { var body: some View { HStack{ Image(systemName: “flame.fill”) .foregroundColor(.red) Image(systemName: “flame”) .foregroundColor(.red) } .padding() } }

How do I set a weight to SF Symbols for iOS 13?

When using the font modifier, set a weight to the font you’re passing. For example, if you want to use one of the default text styles (which I recommend, since they adapt to the user’s Dynamic Type setting), you can do it like this: Image(systemName: “arrow.right”) .font(Font.title.weight(.ultraLight)) If you want to specify a font size, … Read more

Is it possible to use SF Symbols outside of UIImage?

This works for me: let imageAttachment = NSTextAttachment() imageAttachment.image = UIImage(systemName: “checkmark.circle”) // If you want to enable Color in the SF Symbols. imageAttachment.image = UIImage(systemName: “checkmark.circle”)?.withTintColor(.blue) let fullString = NSMutableAttributedString(string: “Press the “) fullString.append(NSAttributedString(attachment: imageAttachment)) fullString.append(NSAttributedString(string: ” button”)) label.attributedText = fullString Result:

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)