mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Create AppAsset shared class, which will replace the separate Mac and iOS AppAssets classes.
This commit is contained in:
@@ -20,6 +20,22 @@ public typealias RSImage = UIImage
|
||||
|
||||
public extension RSImage {
|
||||
|
||||
static func appImage(_ name: String) -> RSImage {
|
||||
|
||||
RSImage(named: name)!
|
||||
}
|
||||
|
||||
static func systemImage(_ symbolName: String) -> RSImage {
|
||||
|
||||
#if canImport(AppKit)
|
||||
NSImage(systemSymbolName: symbolName, accessibilityDescription: nil)!
|
||||
|
||||
#else
|
||||
UIImage(systemName: symbolName)!
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
/// Create a colored image from the source image using a specified color.
|
||||
///
|
||||
/// - Parameter color: The color with which to fill the mask image.
|
||||
|
||||
Reference in New Issue
Block a user