PaymentButtonColor

@objc(PPCPaymentButtonColor)
enum PaymentButtonColor
extension PaymentButtonColor : CaseIterable, CustomStringConvertible, Equatable, Hashable, RawRepresentable

The Smart Payment Button type, this will adjust our images, colors, sizes, etc.

  • The black background and monochrome wordmark, monogram, and white text.

    Declaration

    Swift

    case black
  • The blue background and white wordmark, blue monogram, and white text.

    Declaration

    Swift

    case blue
  • The dark blue background with PayPal Credit wordmark and monogram.

    Declaration

    Swift

    case darkBlue
  • A textual representation of this instance.

    Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the String(describing:) initializer. This initializer works with any type, and uses the custom description property for types that conform to CustomStringConvertible:

    struct Point: CustomStringConvertible {
        let x: Int, y: Int
    
        var description: String {
            return "(\(x), \(y))"
        }
    }
    
    let p = Point(x: 21, y: 30)
    let s = String(describing: p)
    print(s)
    // Prints "(21, 30)"
    

    The conversion of p to a string in the assignment to s uses the Point type’s description property.

    Declaration

    Swift

    var description: String { get }
  • The gold background and blue wordmark, monogram, and black text.

    Declaration

    Swift

    case gold
  • Creates a new instance with the specified raw value.

    If there is no value of the type that corresponds with the specified raw value, this initializer returns nil. For example:

    enum PaperSize: String {
        case A4, A5, Letter, Legal
    }
    
    print(PaperSize(rawValue: "Legal"))
    // Prints "Optional("PaperSize.Legal")"
    
    print(PaperSize(rawValue: "Tabloid"))
    // Prints "nil"
    

    Declaration

    Swift

    init?(rawValue: Int)
  • The silver background and blue wordmark, monogram, and black text.

    Declaration

    Swift

    case silver
  • The white background and blue wordmark, monogram, and black text.

    Declaration

    Swift

    case white