Icon font library for Swift. Currently supports Google Material Design Icons.
- iOS 16.0+
- watchOS 9.0+
- Swift 5.0+
Add via Xcode: File > Add Package Dependencies...
https://github.com/tichise/MaterialDesignSymbol.git
import MaterialDesignSymbol
let symbol = MaterialDesignSymbol(icon: .home48px, size: 30)
let iconImage = symbol.image()With color:
let symbol = MaterialDesignSymbol(icon: .home48px, size: 30)
symbol.addAttribute(foregroundColor: .red)
let iconImage = symbol.image()With custom size:
let symbol = MaterialDesignSymbol(icon: .home48px, size: 25)
let iconImage = symbol.image(size: CGSize(width: 50, height: 50))import MaterialDesignSymbol
titleLabel.font = MaterialDesignFont.shared.fontOfSize(20)
titleLabel.text = MaterialDesignIconEnum.home48px.rawValueimport SwiftUI
import MaterialDesignSymbol
struct ContentView: View {
var body: some View {
Image(uiImage: MaterialDesignSymbol(icon: .home48px, size: 30).image())
}
}Author: Google Link: https://github.com/google/material-design-icons License: Apache License 2.0
MIT License