Classes

The following classes are available globally.

  • Base CardView

    Usage by programatically init:

     let config = BaseConfig(barColor: .systemRed,
                            dueText: "Vencendo hoje,",
                            cardTextColor: .darkGray,
                            cnpj: "99.999.999.0001-99",
                            paid: true,
                            isDue: false,
                            fromEmail: false,
                            addedByUser: false,
                            amount: 50,
                            date: "03 Ago",
                            text: "Tipo de Plano: Premium ULTRA HD",
                            type: .netflix)
    
     let cardView = IPBaseCardView(settings: config)
    

    Alternative to init configuration:

    
     cardView.configure(settings: config)
    

    ### Notes: ###

    1. It can be inherited on .xibs/.storyboards or initialized with the configuration values
    See more

    Declaration

    Swift

    public class IPBaseCardView : UIView

Class

  • Beneficiary Card View

    Usage by programatically init:

    let config = BeneficiaryConfig(barColor: .systemRed,
                                   cardTextColor: .darkGray,
                                   selectorColor: .systemRed,
                                   cardTitle: "CERJ",
                                   cnpj: "99.999.999.0001-99",
                                   activated: false,
                                   amount: 300,
                                   amountLabel: "Valor Limite:",
                                   text: "Débito automático no dia do vencimento",
                                   imageUrl: "https://devshift.biz/wp-content/uploads/2017/04/profile-icon-png-898.png",
                                   type: .monthly)
    
    let cardView = IPBeneficiaryCardView(settings: config)
    

    Alternative to init configuration:

    
    cardView.configure(settings: config)
    

    Notes:

    1. It can be inherited on .xibs/.storyboards or initialized with the configuration values
    See more

    Declaration

    Swift

    public class IPBeneficiaryCardView : UIView
  • Card class used on IPCardListView for SDK internal use

    See more

    Declaration

    Swift

    public class IPCardCollectionCell : UITableViewCell
  • View to be used to display a collection of cards

    Prepare dataset:

    let items = [
        IPCardItem(barColor: .systemRed, cardTitle: nil, dueDate: nextMonthDate, isPaid: false, type: .netflix, amount: 100.0, isLocked: false),
        IPCardItem(barColor: UIColor.from(hex: "#0d56f3"), cardTitle: nil, dueDate: Date(), isPaid: true,  type: .nubank, amount: 150.0, isLocked: false),
        IPCardItem(barColor: .systemGreen, cardTitle: nil, dueDate:Date(), isPaid: false, type: .spotify, amount: 400, isLocked: false),
        IPCardItem(barColor: .systemRed, cardTitle: nil, dueDate:Date(), isPaid: false, type: .lightbill(flag: .red), amount: 400, isLocked: false),
        IPCardItem(barColor: .lightGray, cardTitle: "ARNALDO PESSOA LEAL", dueDate: Date(), type: .standard(imageUrl: "https://devshift.biz/wp-content/uploads/2017/04/profile-icon-png-898.png"), amount: 100.0, isLocked: false),
        IPCardItem(barColor: UIColor.from(hex: "#0d56f3"), cardTitle: nil, dueDate: Date(), isPaid: true, type: .standard(imageUrl: "https://logodownload.org/wp-content/uploads/2014/04/bmw-logo-2.png"), amount: 100.0, isLocked: true)
    ]
    
    let text = "Você tem 4 pagamentos vencendo em até <b>7 dias</b>, no valor total de: ".convertHtml(textColor: .white)
    

    Usage by programatically init:

    let cardListView = IPCardListView(source: items,
                                       featured: true,
                                       featuredColor: .systemOrange,
                                       featuredTextColor: .white,
                                       titleText: "Vencendo em até 7 dias",
                                       totalPaymentText: text,
                                       totalAlignment: .center,
                                       totalDueOnly: true)
    
    

    Alternative to init configuration:

    
    cardListView.configure(source: items,
                            featured: true,
                            featuredColor: .systemOrange,
                            featuredTextColor: .white,
                            titleText: "Vencendo em até 7 dias",
                            totalPaymentText: text,
                            totalAlignment: .center,
                            totalDueOnly: true)
    

    Notes:

    1. It can be inherited on .xibs/.storyboards or initialized with the configuration values
    See more

    Declaration

    Swift

    public class IPCardListView : UIView
    extension IPCardListView: UITableViewDelegate, UITableViewDataSource
  • Modal to be used for Bill and Beneficary detail

    ### Usage: ###

    // Check ModalType for options
    IPBillDetailsModalViewController.showModal(from: benDetails,
                                                payment: # IPPayment object instance #,
                                                highlightColor: .systemRed,
                                                type: .beneficiary)
    
    See more

    Declaration

    Swift

    public class IPBillDetailsModalViewController : UIViewController, UIGestureRecognizerDelegate
  • Basic Modal for messages

    Usage:

    IPMessageModalViewController.showModal(from: self,
                                           title: "Modal title text",
                                           message: "message text")
    
    See more

    Declaration

    Swift

    public class IPMessageModalViewController : UIViewController, UIGestureRecognizerDelegate
  • Basic Modal for messages

    ### Usage: ###

    IPMessageModalViewController.showModal(from: self,
                                           title: "Modal title text",
                                           message: "message text")
    
    See more

    Declaration

    Swift

    public class IPPaymentLimitModalViewController : UIViewController, UIGestureRecognizerDelegate
  • Button with Barcode Icon

    ### Usage: ###

    let barcodeButton = IPBarcodeButton(frame: .zero)
    

    ### Notes: ###

    1. It can be inherited on .xibs/.storyboards
    See more

    Declaration

    Swift

    public class IPBarcodeButton : UIButton

IPPaddingLabel

  • Label with default paddings on sides

    Usage:

    let label = IPPaddingLabel(text: "text", fontSize: 15, weight: .regular, textColor: .darkGray)
    

    Notes:

    1. It can be inherited on .xibs/.storyboards
    See more

    Declaration

    Swift

    public final class IPPaddingLabel : UILabel
  • Button with magnifying glass Icon

    ### Usage: ###

    let searchButton = IPSearchButton(frame: .zero)
    

    ### Notes: ###

    1. It can be inherited on .xibs/.storyboards
    See more

    Declaration

    Swift

    public class IPSearchButton : UIButton
  • Undocumented

    See more

    Declaration

    Swift

    @IBDesignable
    open class RDButton : UIView
  • Undocumented

    See more

    Declaration

    Swift

    @IBDesignable
    open class RDGroup : UIControl
  • Modal to be used for Bill and Beneficary detail

    ### Usage: ###

     beneficiaryDetailsController.setupContent(payment: paymentObject,
                                               baseColor: .systemRed)
    
     beneficiaryDetailsController.handleSeeDetails = {
         IPBillDetailsModalViewController.showModal(from: beneficiaryDetailsController,
                                                    payment: paymentObject,
                                                    highlightColor: .systemRed,
                                                    type: .beneficiary)
     }
    
     beneficiaryDetailsController.handleViewCard = {
         // Action for view card button
     }
    
     beneficiaryDetailsController.handleOptionsClick = {
         // Action for options button
     }
    

    ### Notes: ### Alternatively, can be instanciated programmatically passing the configuration instead of calling setupContent(payment:baseColor:)

    See more

    Declaration

    Swift

    public class IPBeneficiaryDetailsViewController : UIViewController
  • Screen for paid billds

    ### Usage: ###

    
     let paidVc = IPPaidDetailsViewController(beneficiaryName: "John Doe",
                                             paidDate: Date(),
                                             dueDate: Date(),
                                             navTitle: "CERJ",
                                             imageUrl: "https://myimageurl.com/image.png",
                                             paymentAmount: 223.24,
                                             baseColor: .systemRed,
                                             receiptAvailable: true,
                                             paymentMessage: "Sua conta está paga")
    
     // Alternatively, when using with storyboard/xibs, component can be configured the following way:
     paidVC.setContent(beneficiaryName: "John Doe",
                       paidDate: Date(),
                       dueDate: Date(),
                       navTitle: "CERJ",
                       imageUrl: "https://myimageurl.com/image.png",
                       paymentAmount: 223.24,
                       baseColor: .systemRed,
                       receiptAvailable: true,
                       paymentMessage: "Sua conta está paga")
    
     beneficiaryDetailsController.handleReceiptClick = {
         // Action for receipt button
     }
    
    See more

    Declaration

    Swift

    public class IPPaidDetailsViewController : UIViewController
  • Screen for payment details including chart

    ### Usage: ###

    
     let paymentAccount = IPPaymentAccountViewController(payment: paymentObject,
                                                         pdfAvailable: true,
                                                         paymentHistoryEnabled: true,
                                                         chartDataText: "OUTUBRO",
                                                         chartDataValue: "R$ 1.983,36",
                                                         chartLegend: "Resumo das Faturas Anteriores",
                                                         chartData: [IPChartData(label: "JUN", value: 950),
                                                                     IPChartData(label: "JUL", value: 1050),
                                                                     IPChartData(label: "AGO", value: 800),
                                                                     IPChartData(label: "SET", value: 970),
                                                                     IPChartData(label: "OUT", value: 1300),
                                                                     IPChartData(label: "NOV", value: 1500)],
                                                         baseColor: .systemRed)
    
    // Alternative setup method to use when initialized with .xibs/.storyboards
    
     paymentAccount.setupContent(payment: IPPayment, pdfAvailable: Bool, paymentHistoryEnabled: Bool, chartDataText: String, chartDataValue: String, chartLegend: String, chartData: [IPChartData], baseColor: UIColor)
    
    
     // Closures for handling user interaction
    
    paymentAccount.handleSeeDetails = {
        IPBillDetailsModalViewController.showModal(from: paymentAccount,
                                                   payment: self.generatePaymentData(),
                                                   highlightColor: .systemRed,
                                                   type: .bill)
    }
    
     paymentAccount.handleCopyBarcode = { barcode in
        // Closure to handle barcode copy
     }
    
     paymentAccount.handleSeePDF = {
        // Closure to handle opening PDF
     }
    
     paymentAccount.handleRejectBill = {
        // Closure to handle bill rejection
     }
    
     paymentAccount.handleAutoPaymentChange = { isOn in
        // Closure to handle auto payment toggle
     }
    
     paymentAccount.handleOptionsClick = {
        // Closure to handle options button click
     }
    
     paymentAccount.handlePaySchedule = {
        // Closure to handle payment/schedule button click
     }
    
     paymentAccount.handleSeeHistory = {
        // Closure to handle see history button click
     }
    
    
    See more

    Declaration

    Swift

    public class IPPaymentAccountViewController : UIViewController
  • Screen for payment details

    ### Usage: ###

     let payDetailsVc = IPPaymentDetailsViewController(beneficiaryName: "John Doe",
                                                       scheduledDueDate: Date(),
                                                       dueDate: Date(),
                                                       navTitle: "PAGAMENTO",
                                                       paymentAmount: 223.24,
                                                       currentBalance: 3250,
                                                       baseColor: .systemRed,
                                                       paymentMessage: "",
                                                       payerName: "Jane Doe",
                                                       bankName: "ITAU",
                                                       barcode: "34191.09065 44830. 1285 40141.906 8 00001.83120.59475",
                                                       payWithType: "My Banking",
                                                       isPayment: false)
    
     // As an alternative when usigin .xibs this method can be call to setup the screen
     payDetailsVC.setContent(beneficiaryName: "John Doe",
                             scheduledDueDate: Date(),
                             dueDate: Date(),
                             navTitle: "PAGAMENTO",
                             paymentAmount: 223.24,
                             currentBalance: 3250,
                             baseColor: .systemRed,
                             paymentMessage: "",
                             payerName: "Jane Doe",
                             bankName: "ITAU",
                             barcode: "34191.09065 44830. 1285 40141.906 8 00001.83120.59475",
                             payWithType: "My Banking",
                             isPayment: false)
    
     // Closure to handle button on the screen
     payDetailsVC.handleButtonClick = {
         IPMessageModalViewController.showModal(from: payDetailsVC,
                                                title: "Title text",
                                                message: "message text")
     }
    

    # Notes:

    • isPayment false means schedule payment
    See more

    Declaration

    Swift

    public class IPPaymentDetailsViewController : UIViewController
  • Screen for payment receipt

    ### Usage: ###

     let receiptVc = IPReceiptViewController(cedentName: "COMPANHIA DE ELETRICIDADE DO RIO DE JANEIRO",
                                             cnpj: "15.139.629/0001-99",
                                             payerName: "ROBERTO DE OLIVEIRA SANTOS",
                                             barcode: "34191.09065 44830. 1285 40141.906 8 00001.83120.59475",
                                             dueDate: Date(),
                                             paidDate: Date(),
                                             value: 223.24,
                                             discount: 0.0,
                                             interest: 0.0,
                                             fine: 0.0,
                                             chargedValue: 223.24,
                                             authCode: "A.6DE.DF4.75E.DBB,128",
                                             baseColor: .systemRed)
    
     // As an alternative when usigin .xibs this method can be call to setup the screen
     receiptVC.setContent(cedentName: "COMPANHIA DE ELETRICIDADE DO RIO DE JANEIRO",
                          cnpj: "15.139.629/0001-99",
                          payerName: "ROBERTO DE OLIVEIRA SANTOS",
                          barcode: "34191.09065 44830. 1285 40141.906 8 00001.83120.59475",
                          dueDate: Date(),
                          paidDate: Date(),
                          value: 223.24,
                          discount: 0.0,
                          interest: 0.0,
                          fine: 0.0,
                          chargedValue: 223.24,
                          authCode: "A.6DE.DF4.75E.DBB,128",
                          baseColor: .systemRed)
    
     receiptVC.handleShareClick = {
         // Closure for handling share button click
     }
    
     receiptVC.handleOptionsClick = {
     // Closure for handling option button click
     }
    
     // Closure to handle button on the screen
     payDetailsVC.handleButtonClick = {
         IPMessageModalViewController.showModal(from: payDetailsVC,
                                                title: "Title text",
                                                message: "message text")
     }
    
    See more

    Declaration

    Swift

    public class IPReceiptViewController : UIViewController
  • View containing asc and desc button for sorting list and also button to trigger search intention

    Usage:

    let filterView = IPFilterView(caption: "my caption:")
    
     // Alternative when using with .xibs
     filterView.set(caption: "my caption:")
    
     filterView.handleFilter = { sort in
     // Closure to handle filter buttons
     }
    
     filterView.handleFilter = { sort in
     // Closure to handle search button
     }
    

    Notes:

    1. It can be inherited on .xibs/.storyboards
    See more

    Declaration

    Swift

    public class IPFilterView : UIView

Class

  • Month selector view

    ### Usage: ###

    let monthSelectorView = IPMonthSelectorView(tabColor: .systemRed)
    
     // Alternative when using with .xibs
     monthSelectorView.set(tabColor: .systemRed)
     monthSelectorView.set(currentMonth: 6)
    
     monthSelectorView.handleMonthChange = { month in
     // Closure to handle month selection
     }
    
    

    ### Notes: ###

    1. It can be inherited on .xibs/.storyboards
    See more

    Declaration

    Swift

    public class IPMonthSelectorView : UIView
    extension IPMonthSelectorView: UICollectionViewDelegate, UICollectionViewDataSource
  • Tab selector view

    ### Usage: ###

    let tabView = IPTabSelectorView(items: ["Item 1", "Item 2"], tabColor: .systemRed)
    
     // Alternative when using with .xibs
     tabView.set(items: ["Item 1", "Item 2"], tabColor: .systemRed)
    
     tabView.handleItemChange = { itemIndex in
     // Closure to handle item selection
     }
    
    

    ### Notes: ###

    1. It can be inherited on .xibs/.storyboards
    See more

    Declaration

    Swift

    public class IPTabSelectorView : UIView
    extension IPTabSelectorView: UICollectionViewDelegate, UICollectionViewDataSource