diff --git a/Sources/ShopifyCheckout/CheckoutViewController.swift b/Sources/ShopifyCheckout/CheckoutViewController.swift index 4326e192..8cbb2f91 100644 --- a/Sources/ShopifyCheckout/CheckoutViewController.swift +++ b/Sources/ShopifyCheckout/CheckoutViewController.swift @@ -45,13 +45,16 @@ class CheckoutViewController: UIViewController, UIAdaptivePresentationController private lazy var closeBarButtonItem: UIBarButtonItem = { switch ShopifyCheckout.configuration.colorScheme { case .web: - return UIBarButtonItem( - barButtonSystemItem: .stop, target: self, action: #selector(close) - ) + let closeIcon = UIImage(systemName: "xmark")? + .withConfiguration(UIImage.SymbolConfiguration(pointSize: 14, weight: .regular)) + .withTintColor(.white, renderingMode: .alwaysOriginal) + let closeBarButtonItem = UIBarButtonItem(image: closeIcon, style: .plain, target: self, action: #selector(close)) + return closeBarButtonItem default: - return UIBarButtonItem( + let closeIcon = UIBarButtonItem( barButtonSystemItem: .close, target: self, action: #selector(close) ) + return closeIcon } }()