Sliding UIControl for controlling IoT or home devices
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ControlSlider.xcodeproj
ControlSlider
screens
.gitignore
ControlSlider.podspec
LICENSE
README.md

README.md

ControlSlider

Description

The ControlSlider is a custom UIControl for iOS written in Swift 2.0.

Example 1 Example 2 Example 3

Features:

  • vertical Slider
  • @IBDesignable/@Inspectable for direct use within Interface Builder
  • use together with ReactiveCocoa

License: Apache 2 License Language: Swift 2

Requirements

  • iOS 8.0+
  • Xcode 7

Installation

The easiest way is to use CocoaPods for using ControlSlider

use_frameworks!
pod 'ControlSlider', :git =>  'https://github.com/msedd/ControlSlider.git'

Usage

  • add a UIView to your controller in the storyboard add View

  • select as Class and Modul ControlSlider select class

  • you can adjust the color of each part from the Slider Customize the color

  • add the UIView as @IBOutlet to your Controller class add Outlet

  • use ControlSlider together with ReactiveCocoa

override func viewDidLoad() {
	super.viewDidLoad()
    ...
	self.dimmer1.rac_valuesForKeyPath("value", observer: self).subscribeNext { (newVal:AnyObject!) -> Void in
    	let value = newVal as! Float
        let intValue:UInt8 = UInt8(value)
        self.data[0]=intValue
		BluetoothController.sharedInstance.send(self.data)
	}
	self.dimmer2.rac_valuesForKeyPath ...
	...
}

License

Copyright 2016 Marko Seifert ControlSlider is available under the Apache 2 License. See the LICENSE file for more info.