UIImageView that loads and displays payment method icons with dark mode support.
// Source: https://github.com/stripe/stripe-ios | License: MIT | Copyright 2011- Stripe, Inc. (https://stripe.com)
// Provided via justclaw.it.com; keep this notice with the code.
//
// PaymentMethodTypeImageView.swift
// StripePaymentSheet
//
// Created by Yuki Tokuhiro on 5/13/24.
//
@_spi(STP) import StripeUICore
import UIKit
/// A convenience UIImageView that displays the payment method types image, handles the download, and automatically updates its image for dark mode.
class PaymentMethodTypeImageView: UIImageView {
let paymentMethodType: PaymentSheet.PaymentMethodType
let contrastMatchingColor: UIColor
let currency: String?
let iconStyle: PaymentSheet.Appearance.IconStyle
/// Initializes a PaymentMethodTypeImageView with the specified payment method type an
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key