File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Sources/YCoreUI/Protocols Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 55// Created by Dev Karan on 19/12/22.
66// Copyright © 2022 Y Media Labs. All rights reserved.
77//
8+
9+ import Foundation
10+ import UIKit
11+
12+ public protocol ImageAsset {
13+ /// The bundle containing the localized strings for this enum.
14+ static var bundle : Bundle { get }
15+
16+ /// Optional namespace for the image assets (default is `nil`).
17+ static var namespace : String ? { get }
18+
19+ /// Fallback image to use in case an image asset cannot be loaded (default is `.systemPink`)
20+ static var fallbackImage : UIImage { get }
21+
22+ /// An image asset for this name value.
23+ ///
24+ /// Default implementation calls `loadImage` and nil-coalesces to `fallbackImage`.
25+ var image : UIImage { get }
26+
27+ /// Loads the image.
28+ ///
29+ /// - Returns: The named image or else `nil`,If the named asset cannot be loaded.
30+ func loadImage( ) -> UIImage ?
31+ }
You can’t perform that action at this time.
0 commit comments