Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sparrowcode/safesfsymbols
Safe access SFSymbols. If symbol not available, will show warning.
https://github.com/sparrowcode/safesfsymbols
awesome extension images safe safesymbols sanfrancisco sanfranciso-fonts sf-symbols sf-symbols-font sf-symbols-ios sfsymbols spm swiftui uiimage uikit
Last synced: 2 months ago
JSON representation
Safe access SFSymbols. If symbol not available, will show warning.
- Host: GitHub
- URL: https://github.com/sparrowcode/safesfsymbols
- Owner: sparrowcode
- License: mit
- Created: 2022-01-15T13:33:08.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-02T12:12:33.000Z (6 months ago)
- Last Synced: 2024-10-29T03:05:03.872Z (3 months ago)
- Topics: awesome, extension, images, safe, safesymbols, sanfrancisco, sanfranciso-fonts, sf-symbols, sf-symbols-font, sf-symbols-ios, sfsymbols, spm, swiftui, uiimage, uikit
- Language: Swift
- Homepage: https://sparrowcode.io/frameworks
- Size: 1020 KB
- Stars: 183
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# SafeSFSymbols
Safe access SFSymbols. If symbol not available, will show warning.
```swift
// Replace this
UIImage(systemName: "star.fill")
// to this
UIImage(.star.fill)
```### iOS Dev Community
## Navigate
- [Installation](#installation)
- [Swift Package Manager](#swift-package-manager)
- [CocoaPods](#cocoapods)
- [Manually](#manually)
- [Usage](#usage)
- [UIKit](#uikit)
- [SwiftUI](#swiftui)
- [AppKit](#appkit)## Installation
Ready to use on iOS 13+, tvOS 13+ & watchOS 6+.
### Swift Package Manager
In Xcode go to Project -> Your Project Name -> `Package Dependencies` -> Tap *Plus*. Insert url:
```
https://github.com/sparrowcode/SafeSFSymbols
```or adding it to the `dependencies` of your `Package.swift`:
```swift
dependencies: [
.package(url: "https://github.com/sparrowcode/SafeSFSymbols", .upToNextMajor(from: "2.0.1"))
]
```### CocoaPods:
This is an outdated way. I advise you to use [SPM](#swift-package-manager). However, I will continue to support Cocoapods for some time.
Cocoapods Instalation
[CocoaPods](https://cocoapods.org) is a dependency manager. For usage and installation instructions, visit their website. To integrate using CocoaPods, specify it in your `Podfile`:
```ruby
pod 'SafeSFSymbols'
```### Manually
If you prefer not to use any of dependency managers, you can integrate manually. Put `Sources/SafeSFSymbols` folder to your Xcode project. Make sure to enable `Copy items if needed` and `Create groups`.
## Usage
### UIKit
```swift
let image = UIImage(.trash.circle)
```### SwiftUI
```swift
Image(.trash.circle)
```### AppKit
```swift
let image = NSImage(.trash.circle)
```