From 36496d7b5b84f5f799d931ed2fb89a1f6e59b2ae Mon Sep 17 00:00:00 2001 From: ashwinpra Date: Fri, 20 Oct 2023 11:26:33 +0530 Subject: [PATCH] Replaced UIImage's imageLiteralResourceName initialiser with named --- .../Classes/Extensions/UIImage+Woo.swift | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/WooCommerce/Classes/Extensions/UIImage+Woo.swift b/WooCommerce/Classes/Extensions/UIImage+Woo.swift index 91a6fbe269a..60811e3f763 100644 --- a/WooCommerce/Classes/Extensions/UIImage+Woo.swift +++ b/WooCommerce/Classes/Extensions/UIImage+Woo.swift @@ -447,7 +447,7 @@ extension UIImage { /// House Outlined Image /// static var houseOutlinedImage: UIImage { - UIImage(imageLiteralResourceName: "icon-house-outlined") + UIImage(named: "icon-house-outlined") } /// Mailbox Icon - used in hub menu @@ -1122,7 +1122,7 @@ extension UIImage { } static var syncDotIcon: UIImage { - return UIImage(imageLiteralResourceName: "icon-sync-dot") + return UIImage(named: "icon-sync-dot") } /// Variations Icon @@ -1146,25 +1146,25 @@ extension UIImage { /// No store image /// static var noStoreImage: UIImage { - return UIImage(imageLiteralResourceName: "woo-no-store").imageFlippedForRightToLeftLayoutDirection() + return UIImage(named: "woo-no-store").imageFlippedForRightToLeftLayoutDirection() } /// Upgrade plan error /// static var planUpgradeError: UIImage { - return UIImage(imageLiteralResourceName: "plan-upgrade-error") + return UIImage(named: "plan-upgrade-error") } /// Upgrade plan success celebratory image /// static var planUpgradeSuccessCelebration: UIImage { - return UIImage(imageLiteralResourceName: "plan-upgrade-success-celebration") + return UIImage(named: "plan-upgrade-success-celebration") } /// Megaphone Icon /// static var megaphoneIcon: UIImage { - return UIImage(imageLiteralResourceName: "megaphone").imageFlippedForRightToLeftLayoutDirection() + return UIImage(named: "megaphone").imageFlippedForRightToLeftLayoutDirection() } /// Speaker icon @@ -1182,13 +1182,13 @@ extension UIImage { /// Error image /// static var errorImage: UIImage { - return UIImage(imageLiteralResourceName: "woo-error").imageFlippedForRightToLeftLayoutDirection() + return UIImage(named: "woo-error").imageFlippedForRightToLeftLayoutDirection() } /// Empty box image /// static var emptyBoxImage: UIImage { - UIImage(imageLiteralResourceName: "empty-box") + UIImage(named: "empty-box") } /// Creates a bitmap image of the Woo "bubble" logo based on a vector image in our asset catalog. @@ -1242,7 +1242,7 @@ extension UIImage { /// Welcome Image /// static var welcomeImage: UIImage { - UIImage(imageLiteralResourceName: "img-welcome") + UIImage(named: "img-welcome") } /// Icon Circular Rate Discount (used in WCShip onboarding) @@ -1351,61 +1351,61 @@ extension UIImage { } static var iconBolt: UIImage { - UIImage(imageLiteralResourceName: "icon-bolt") + UIImage(named: "icon-bolt") } /// Illustration for the free trial summary screen. /// static var freeTrialIllustration: UIImage { - UIImage(imageLiteralResourceName: "free-trial-ilustration") + UIImage(named: "free-trial-ilustration") } static var ecommerceIcon: UIImage { - UIImage(imageLiteralResourceName: "ecommerce-icon") + UIImage(named: "ecommerce-icon") } static var supportIcon: UIImage { - UIImage(imageLiteralResourceName: "support-icon") + UIImage(named: "support-icon") } static var backupsIcon: UIImage { - UIImage(imageLiteralResourceName: "backups-icon") + UIImage(named: "backups-icon") } static var giftIcon: UIImage { - UIImage(imageLiteralResourceName: "gifts-icon") + UIImage(named: "gifts-icon") } static var emailOutlineIcon: UIImage { - UIImage(imageLiteralResourceName: "email-outline-icon") + UIImage(named: "email-outline-icon") } static var shippingOutlineIcon: UIImage { - UIImage(imageLiteralResourceName: "shipping-outline-icon") + UIImage(named: "shipping-outline-icon") } static var advertisingIcon: UIImage { - UIImage(imageLiteralResourceName: "advertising-icon") + UIImage(named: "advertising-icon") } static var launchIcon: UIImage { - UIImage(imageLiteralResourceName: "launch-icon") + UIImage(named: "launch-icon") } static var paymentOptionsIcon: UIImage { - UIImage(imageLiteralResourceName: "payment-options-icon") + UIImage(named: "payment-options-icon") } static var premiumThemesIcon: UIImage { - UIImage(imageLiteralResourceName: "premium-themes-icon") + UIImage(named: "premium-themes-icon") } static var siteSecurityIcon: UIImage { - UIImage(imageLiteralResourceName: "site-security-icon") + UIImage(named: "site-security-icon") } static var unlimitedProductsIcon: UIImage { - UIImage(imageLiteralResourceName: "unlimited-products-icon") + UIImage(named: "unlimited-products-icon") } static var feedbackOutlineIcon: UIImage {