An open API service indexing awesome lists of open source software.

https://github.com/shutdownr/circlepicker

A custom UIView for multiple choice selection
https://github.com/shutdownr/circlepicker

ios swift ui ui-components uikit xcode

Last synced: 7 months ago
JSON representation

A custom UIView for multiple choice selection

Awesome Lists containing this project

README

          

CirclePicker


by Tim Kreuzer


CirclePicker is a custom UIView. It allows multiple choice selection of different elements which can be customised by the programmer. Furthermore you can configure CirclePicker for your own needs with multiple parameters.

Requirements



  • iOS 9.0+

  • Xcode 9.0+


Installation



Download and copy the files from "Code" to your Xcode-project and you're good to go.



You can also install CirclePicker using CocoaPods.
Add the following line in your Podfile:

pod 'CirclePicker'


Usage



Create a new Object of the type CirclePicker. You need to set the dataSource attribute (CirclePickerDataSource-protocol) to fill it with data. Then you can use the method attachToView(_ :) to attach the picker to a certain view. The picker itself will be displayed now. In order to respond to user interaction, you need to set the delegate attribute (CirclePickerDelegate-protocol) which will be called on every interaction.

Your code should look something like this:


class MyViewController : UIViewController, CirclePickerDelegate, CirclePickerDataSource {
...
let picker = CirclePicker()
picker.dataSource = self
picker.delegate = self
picker.attachToView(myView)
...