mirror of
https://github.com/RevenueCat/purchases-ios
synced 2026-11-11 22:55:55 +05:45
### Motivation Template 5 but with multiple tiers 😊 ### Description Enabling Template 7 by changing `7_disabled` to `7` - Changed a `header.jpg` to `header.heic` to try and fix issue with weirdly failing snapshot UI test - Changed visibility on `TestData` from `public` to `internal` - Hides tier selector if only one tier - Changed `color_overrides_by_tier` to `colors_by_tier` and `image_overrides_by_tier` to `images_by_tier` - The original implementation was going to default to existing color and images configurations and then override by tier - However, this turned out to be harder to implement on the configuration side - `Colors` got four new optional values - `tier_control_background` - `tier_control_foreground` - `tier_control_selected_background` - `tier_control_selected_foreground` ### Demo #### Full Screen https://github.com/RevenueCat/purchases-ios/assets/401294/e5317a53-428c-415e-a1a1-b4231d32a776 ### Footer https://github.com/RevenueCat/purchases-ios/assets/401294/8905b55e-0fa2-49f0-aa1c-d4c1e694fb5b ### Footer Condensed https://github.com/RevenueCat/purchases-ios/assets/401294/311d78fb-bdeb-43cd-b601-9c60a8a54b6f
31 lines
709 B
Swift
31 lines
709 B
Swift
//
|
|
// Copyright RevenueCat Inc. All Rights Reserved.
|
|
//
|
|
// Licensed under the MIT License (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// https://opensource.org/licenses/MIT
|
|
//
|
|
// PaywallTemplate.swift
|
|
//
|
|
// Created by Nacho Soto on 7/10/23.
|
|
|
|
import Foundation
|
|
|
|
/// The type of template used to display a paywall.
|
|
// @PublicForExternalTesting
|
|
enum PaywallTemplate: String {
|
|
|
|
case template1 = "1"
|
|
case template2 = "2"
|
|
case template3 = "3"
|
|
case template4 = "4"
|
|
case template5 = "5"
|
|
case template7 = "7"
|
|
|
|
}
|
|
|
|
extension PaywallTemplate: Equatable {}
|
|
extension PaywallTemplate: CaseIterable {}
|