aboutsummaryrefslogtreecommitdiff
path: root/foray/Extensions
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--foray/Extensions/UIImage+Extensions.swift21
1 files changed, 21 insertions, 0 deletions
diff --git a/foray/Extensions/UIImage+Extensions.swift b/foray/Extensions/UIImage+Extensions.swift
new file mode 100644
index 0000000..252c3fb
--- /dev/null
+++ b/foray/Extensions/UIImage+Extensions.swift
@@ -0,0 +1,21 @@
+//
+// UIImage+Extensions.swift
+// foray
+//
+// Created by Nicholas Tay on 17/7/2022.
+//
+
+import UIKit
+
+extension UIImage {
+ static func fromAsset(_ assetImage: AssetImage) -> UIImage {
+ return UIImage(named: assetImage.rawValue)!
+ }
+}
+
+/// Known asset images that we can safely unwrap
+enum AssetImage: String {
+ case AppIcon
+ case it
+ case spy
+}