Home   →   Blog   →   Unusual Controllers for Managing Various Characteristics

Unusual Controllers for Managing Various Characteristics

Our company keeps on creating plugins, templates and open-source libraries which can be useful to developers. Today, we are pleased to offer you a new free lightweight plugin aimed to help you create unusual and expressive controllers for managing various characteristics.

What is Picker?

Picker is a controller for setting and changing any calculated characteristic. For example, it can be used as a spectacular countdown timer or for keeping the score in the game interface for those who’d like to design it in the particularly colorful way.

This controller is easy-to-use, appealing and user-friendly. Any application will definitely gain by being supplemented with our AGCircularPicker plugin.

68747470733a2f2f6a2e676966732e636f6d2f316a4a79386d2e676966.gif68747470733a2f2f6a2e676966732e636f6d2f35384e444e4b2e676966.gif

Customization

Our AGCircularPicker can be customized to meet your individual requirements. The developer can set the number of the controllers and their design by selecting a color, gradient and other similar parameters. In addition, it’s possible to specify the transition type for showing controllers on the screen.

So, as you see, AGCircularPicker plugin can be adapted to any app and designed in accordance with its style.

How to use?

import AGCircularPicker

AGCircularPickerView could be used either from Interface Builder by linking outlet or from the code.

The main requirement to let it work is to setup AGCircularPickerOption. Once it is set picker will automatically setup all required data.

public struct AGCircularPickerOption {

    var titleOption: AGCircularPickerTitleOption? = nil
    var valueOption: AGCircularPickerValueOption!
    var colorOption: AGCircularPickerColorOption = AGCircularPickerColorOption()

}

It consists of three option groups: AGCircularPickerTitleOption (defines title, it's color and font), AGCircularPickerValueOption (defines min and max values and number of rounds) and AGCircularPickerColorOption (defines gradient colors, gradient locations, and angle)

AGCircularPickerValueOption is required whereas two others are optional.

If AGCircularPickerTitleOption is empty control will have no title.

If AGCircularPickerColorOption is not set control will use default colors.

AGCircularPickerView has a delegate to notify about any changes

public protocol AGCircularPickerViewDelegate {

    func circularPickerViewDidChangeValue(_ value: Int, color: UIColor, index: Int)
    func circularPickerViewDidEndSetupWith(_ value: Int, color: UIColor, index: Int)
    func didBeginTracking(timePickerView: AGCircularPickerView)
    func didEndTracking(timePickerView: AGCircularPickerView)

}

Let's see how we can use it in practice. First, we should link it in the Interface Builder

@IBOutlet weak var circularPickerView: AGCircularPickerView!

Then we hould define required options and setup control with it and delegate if needed

override func viewDidLoad() {
    super.viewDidLoad()
    let valueOption = AGCircularPickerValueOption(minValue: 0, maxValue: 100)
    let titleOption = AGCircularPickerTitleOption(title: "volume")
    let option = AGCircularPickerOption(valueOption: valueOption, titleOption: titleOption)
    pickerView.setupPicker(delegate: self, option: option)
}

If you are interested in the AGCircularPicker plugin, welcome to this page to find its full description.

Next Posts
7c5a498bcb2ed3c81303f9531c1e0f23889b54e7 GOBUTTON Plugin. Diversify the Waiting Process
Usually, people don’t like to wait and do “nothing”. However, very often it’s inevitable. That's why one needs to make this time as pleasant or at least tolerable as possible. And this is especially true when developing applications, for it's very importa
1667ad31373295eafe858140ded0c8f8726db22f The Layout Testing
Testing web projects includes a number of different stages. But now we're going to discuss only one of them, namely - the layout testing.
Notice Our website uses cookies, which are necessary for its functioning and required to achieve the purposes illustrated in the privacy policy. By closing this banner you agree to the use of cookies.