/RoundSelection

iOS Code - Round Selection Library

Primary LanguageSwiftMIT LicenseMIT

Round Selection

This library gives you round buttons to be used in your projects.

Swift Version License CocoaPods Version

Build Status

This RoundSelection library helps you to do round selection.

Features

  • Add icon and title for your button.
  • Choose the color for the background and title.
  • Choose the check mark image.

Requirements

  • Xcode 12.x
  • Swift 5.x

Installation

CocoaPods

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

platform :ios, '15.0'
use_frameworks!
pod 'RoundSelection', :git => 'https://github.com/TeloTechnology/RoundSelection.git', :tag => '1.0.0'

Import after installation

To get the full benefits import RoundSelection.

import RoundSelection

Manually

  1. Download and drop RoundSelection folder in your project.
  2. Congratulations!

Usage example

@IBOutlet
private weak var customView1: RoundSelectionView!

//RoundSelectionView
customView1.data = RoundSelectionView.Data(icon: UIImage(named: "CreditCard"), title: "Credit Card")

customView1.colorBackgroundOnSelected = .black
customView1.colorTitleOnSelected = .white

customView1.didSelected = { [weak self] isSelected in
    if let title = self?.customView1.titleData {
        print("Selected: \(isSelected) ", title)
    }
}
@IBOutlet
private weak var customView1: RoundSelectionView!

//RoundSelectionView
customView1.data = RoundSelectionView.Data(icon: UIImage(named: "CreditCard"), title: "Credit Card")
customView1.checkMarkImage = UIImage(named: "GreenCheckMark")

Check the demo project.

Contribute

We would love you for the contribution to RoundSelection, please create a Pull Request.

Meta

Rudi Luis – @Linkedin

Telo Technology Limited – @Website