Subscription View Controller like the Tinder uses

Overview

SubscriptionPrompt

SubscriptionPrompt is a UIViewController with a carousel at the top and a number of rows at the bottom. Written in Swift, works for Objective-C as well.

SubscriptionPrompt screenshot

Installation

CocoaPods

You can use CocoaPods to install SubscriptionPrompt by adding it to your Podfile:

platform :ios, '8.0'
use_frameworks!
pod 'SubscriptionPrompt'

Manually

Download and drop /SubscriptionPromptfolder in your project.

Usage

Just initialize the SubscriptionViewontroller with the following constructor, you can omit some parameters since they have default values:

init(title: String? = nil, slides: [Slide], options: [Option],
	cancelMessage: String? = nil, restoreButtonTitle: String? = nil)

and present it.

Slide and Option are structs, use the following inits to create them:

init(image: UIImage?, title: String?, subtitle: String?)
init(title: String?, checked: Bool = false)

To get the index of tapped rows, implement the SubscriptionViewControllerDelegate.

override func viewDidLoad() {
      super.viewDidLoad()
      subscriptionViewController.delegate = self
}

func subscriptionViewControllerRowTapped(atIndex index: Int) {
    print("tapped index: \(index)")
}

animateDraggingToTheRight(duration:) - animates a little drag to the right and back with the given duration [ux hint for the user that the carousel is draggable]

Styles customization

Set stylingDelegate: SubscriptionViewControllerStylingDelegate to customize styles. There are three optional methods:

optional func subscriptionViewControllerSlideStyle(atIndex index: Int) -> SlideStyle
optional func subscriptionViewControllerOptionStyle(atIndex index: Int) -> OptionStyle
optional func subscriptionViewControllerNotNowButtonStyle() -> OptionStyle

The methods return OptionStyle and SlideStyle. They represent the looks of the subscription options at the bottom and of the slides at the top.

Use the following init for OptionStyle:

init(backgroundColor: UIColor? = nil, textFont: UIFont? = nil,
	textColor: UIColor? = nil, accessoryType: UITableViewCellAccessoryType? = nil)

and for SlideStyle:

init(backgroundColor: UIColor? = nil, titleFont: UIFont? = nil,
	subtitleFont: UIFont? = nil, titleColor: UIColor? = nil, 
	subtitleColor: UIColor? = nil)

The title is customizable via the titleFont and titleColor properties. You can also change the background dim color using the dimColor: UIColor and dimView: UIView properties.

TODO

  1. Bug fixes.
  2. Add closure-based delegation API. Example:
subscriptionVC.rowTapped { idx in
	print("tapped index: \(idx)")
}
You might also like...
Swipe to "like" or "dislike" any view, just like Tinder.app. Build a flashcard app, a photo viewer, and more, in minutes, not hours!

MDCSwipeToChoose Swipe to "like" or "dislike" any view, just like Tinder.app. Build a flashcard app, a photo viewer, and more, in minutes, not hours!

Swipe able, customizable card stack view, Tinder like card stack view based on UICollectionView. Cards UI
Swipe able, customizable card stack view, Tinder like card stack view based on UICollectionView. Cards UI

Swipable, customizable card stack view, Tinder like card stack view based on UICollectionView. Cards UI Π‘ocoapods installation Add in your Podfile: po

A controller that uses a UIStackView and view controller composition to display content in a list
A controller that uses a UIStackView and view controller composition to display content in a list

StackViewController Overview StackViewController is a Swift framework that simplifies the process of building forms and other static content using UIS

Build, Measure and Grow iOS subscription business

Apphud SDK Apphud SDK is a lightweight open-source Swift library to manage auto-renewable subscriptions and other in-app purchases in your iOS app. No

iOS SDK for cross-platform in-app purchase and subscription infrastructure, revenue analytics, engagement automation, and integrations
iOS SDK for cross-platform in-app purchase and subscription infrastructure, revenue analytics, engagement automation, and integrations

Qonversion is the data platform to power in-app subscription revenue growth. fast in-app subscriptions implementation back-end infrastructure to valid

A easy-to-use SwiftUI view for Tinder like cards on iOS, macOS & watchOS.
A easy-to-use SwiftUI view for Tinder like cards on iOS, macOS & watchOS.

πŸƒ CardStack A easy-to-use SwiftUI view for Tinder like cards on iOS, macOS & watchOS. Installation Xcode 11 & Swift Package Manager Use the package r

Poi - You can use tinder UI like tableview method
Poi - You can use tinder UI like tableview method

Poi You can use tinder UI like tableview method Installation Manual Installation Use this command git clone [email protected]:HideakiTouhara/Poi.git Imp

Tinder like ui using SwiftUI

// // User.swift // CardUI // // Created by paige on 2021/12/09. // import SwiftUI struct User: Identifiable { var id = UUID().uuidString

KolodaView is a class designed to simplify the implementation of Tinder like cards on iOS.
KolodaView is a class designed to simplify the implementation of Tinder like cards on iOS.

KolodaView Check this article on our blog. Purpose KolodaView is a class designed to simplify the implementation of Tinder like cards on iOS. It adds

πŸƒ Tinder like card interface
πŸƒ Tinder like card interface

Features Swift 3 Custom views for the card & overlay Generic Dynamically add new cards on top or on the bottom Lazy view loading Setup pod 'DMSwipeCar

Tinder/Bumble like user image with user details scroll animation
Tinder/Bumble like user image with user details scroll animation

TinderUserProfile Tinder/Bumble like user image with user details scroll animation Add ProfileView.m,ProfileView.h class to your project. Set the clas

A paging menu controller built from other view controllers placed inside a scroll view (like Spotify, Windows Phone, Instagram)
A paging menu controller built from other view controllers placed inside a scroll view (like Spotify, Windows Phone, Instagram)

Unfortunately, life gets in the way sometimes and I won't be able to maintain this library any longer and upgrade this library to where it needs to be

A marriage between the Shazam Discover UI and Tinder, built with UICollectionView in Swift.
A marriage between the Shazam Discover UI and Tinder, built with UICollectionView in Swift.

VerticalCardSwiper A marriage between the Shazam Discover UI and Tinder, built with UICollectionView in Swift. Project goal and information The goal o

πŸ”₯ A multi-directional card swiping library inspired by Tinder
πŸ”₯ A multi-directional card swiping library inspired by Tinder

Made with ❀️ by Mac Gallagher Features πŸ’‘ Advanced swipe recognition based on velocity and card position πŸ’‘ Manual and programmatic actions πŸ’‘ Smooth

A framework that provides CurtainController. CurtainController is a container view controller that implements a content-curtain interface. You can find a similar implementation in applications like Apple Maps, Find My, Stocks, etc. Someone calls it
🍞 [Beta] A view controller that can unwind like presentation and navigation.

FluidPresentation - no more handling presented or pushed in view controller A view controller that supports the interactive dismissal by edge pan gest

iOS routing done right. Handles both URL recognition and controller displaying with parsed parameters. All in one line, controller stack preserved automatically!
iOS routing done right. Handles both URL recognition and controller displaying with parsed parameters. All in one line, controller stack preserved automatically!

Developed and Maintained by Ipodishima Founder & CTO at Wasappli Inc. (If you need to develop an app, get in touch with our team!) So what is this lib

Mimicrate to native UIPageViewController. Each page is new controller, it can be even navigation controller.
Mimicrate to native UIPageViewController. Each page is new controller, it can be even navigation controller.

Mimicrate to native UIPageViewController. Each page is new controller, it can be even navigation controller. Support parent layout margins, paging and scroll by index. Don't have bug with tranlation when rotate.

SwiftMessages is a very flexible view and view controller presentation library for iOS.
SwiftMessages is a very flexible view and view controller presentation library for iOS.

SwiftMessages Overview SwiftMessages is a very flexible view and view controller presentation library for iOS. Message views and view controllers can

Comments
  • dispatch_async only on some properties?

    dispatch_async only on some properties?

    Hey!

    Awesome library, thanks for all your work!

    I was looking through your class and I noticed an inconsistency - I'm sure you had your reasons for writing SubscriptionViewController, and I'd love to understand.

    For some of the properties (dimColor, dimView, restoreButtonTitle), you wrap the property observer in a dispatch_async(mainThread) {}, whereas for others (titleFont, titleColor) you don't.

    Can you help me understand why?

    opened by AndrewSB 1
Owner
Binur Konarbai
react-native developer
Binur Konarbai
PopupController is a controller for showing temporary popup view.

PopupController PopupController is a controller for showing temporary popup view. Demo Try PopupController on Appetize.io Installation CocoaPods pod '

daisuke sato 338 Dec 14, 2022
A framework for presenting bars and view controllers as popup, much like the look and feel of Apple Music App.

PBPopupController PBPopupController is a framework for presenting bars and view controllers as popup, much like the look and feel of Apple Music App.

Patrick 58 Dec 3, 2022
A highly customizable alert dialog controller that mimics Snapchat's alert dialog.

AZDialogViewController A highly customizable alert dialog controller that mimics Snapchat's alert dialog. Screenshots Installation CocoaPods: pod 'AZD

Antonio Zaitoun 771 Dec 11, 2022
SSToastMessage is written purely in SwiftUI. It will add toast, alert, and floating message view over the top of any view. It is intended to be simple, lightweight, and easy to use. It will be a popup with a single line of code.

SSToastMessage SSToastMessage is written in SwiftUI. It will add toast, alert, and floating message view over the top of any view. It is intended to b

Simform Solutions 223 Dec 2, 2022
STPopup provides STPopupController, which works just like UINavigationController in popup style, for both iPhone and iPad. It's written in Objective-C and compatible with Swift.

STPopup STPopup provides STPopupController, which works just like UINavigationController in popup style, for both iPhone and iPad. It's written in Obj

Kevin Lin 2.6k Jan 6, 2023
Popover is a balloon library like Facebook app. It is written in pure swift.

Popover Description and appetize.io`s DEMO Usage To run the example project, clone the repo, and run pod install from the Example directory first. Sim

Yusuke Takahashi 2k Jan 2, 2023
Pop-up based view(e.g. alert sheet), can be easily customized.

MMPopupView 中文介绍 A basic Pop-Up Kit allows you to easily create Pop-Up view. You can focus on the only view you want to show. Besides, it comes with 2

ralph li 2.1k Jan 3, 2023
A lightweight library for popup view

SHPopup SHPop is lightweight library used for popup view Sample One Sample Two Sample Three Features SHPopup supports a popup inside another popup wit

Shezad Ahamed 37 Oct 2, 2022
A Swift Popup Module help you popup your custom view easily

JFPopup JFPopup is a Swift Module help you popup your custom view easily. Support 3 way to popup, Drawer, Dialog and BottomSheet. Example To run the e

ι€Έι£Ž 77 Dec 14, 2022
Alejandro Piguave 24 Dec 30, 2022