Swiftpack.co - onmyway133/FontAwesomeSwiftUI as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by onmyway133.
onmyway133/FontAwesomeSwiftUI 1.0.5
Easy to use FontAwesome 5 in SwiftUI
⭐️ 97
🕓 9 weeks ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/onmyway133/FontAwesomeSwiftUI.git", from: "1.0.5")

FontAwesomeSwiftUI

Description

Use FontAwesome 5 in your SwiftUI at ease.

  • ☑ FontAwesome 5 free versions
  • ☑ Type safe icon enums
  • ☑ Support 3 styles: regular, brand, solid
  • ☑ Support iOS, macOS, tvOS, watchOS

Usage

For iOS, to register fonts programmatically instead of declaring in Info.plist, you can use below register method.

FontAwesome.register()

For macOS, you only need to declare fonts path, copy below to Info.plist

<key>ATSApplicationFontsPath</key>
<string>.</string>

To find which icon name is for which style, consult fontawesome.com website

Text(AwesomeIcon.aws.rawValue)
    .font(.awesome(style: .brand, size: 20))
    .foregroundColor(.white)

Installation

FontAwesomeSwiftUI is available through Swift Package Manager. Add FontAwesomeSwiftUI as a dependency to your Package.swift

.package(url: "https://github.com/onmyway133/FontAwesomeSwiftUI", from: "1.0.4")

FontAwesomeSwiftUI can also be installed manually. Just download and drop Sources folders in your project.

Author

Khoa Pham, [email protected]

Credit

  • thii for icon enums

License

FontAwesomeSwiftUI is available under the MIT license. See the LICENSE file for more info.

GitHub

link
Stars: 97
Last commit: 9 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics