Created
July 5, 2020 15:31
-
-
Save diamantidis/bf9d1ffb70c1f185298e7e16136865db to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) | |
public extension Image { | |
/// Creates an image object containing a system symbol image. | |
/// | |
/// - Parameter sfSymbol: The name of the `SFSymbol` | |
/// - Usage | |
/// ``` | |
/// Image(sfSymbol: .checkmarkCircleFill) | |
/// ``` | |
@available(OSX, unavailable) | |
init(sfSymbol: SFSymbol) { | |
self.init(systemName: sfSymbol.rawValue) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment