We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d5dbe0 commit a5ab5c3Copy full SHA for a5ab5c3
1 file changed
Sources/YCoreUI/Protocols/ImageAsset.swift
@@ -9,6 +9,12 @@
9
import Foundation
10
import UIKit
11
12
+/// Any named image asset can be loaded from an asset catalog
13
+///
14
+/// All properties and functions have default implementations. At a minimum just have your string-based enum conform
15
+/// to `ImageAsset` (and have an asset catalog with matching assets). If your enum and assets live inside a Swift
16
+/// package, override `bundle` to return `.module`. If your assets are categorized within their asset catalog by
17
+/// a namespace, then override `namespace` to return the proper string prefix.
18
public protocol ImageAsset: RawRepresentable where RawValue == String {
19
/// The bundle containing the image assets for this enum (default is `.main`)
20
static var bundle: Bundle { get }
0 commit comments