@@ -5,4 +5,77 @@
6A stepper with a sliding label in the middle.
6A stepper with a sliding label in the middle.
8
10
15+GMStepper is available through [CocoaPods](http://cocoapods.org). To install
16+it, simply add the following lines to your Podfile:
25+If you want to use the storyboard, just drop a UIView into your storyboard and set its class to `GMStepper`. Then customize through the attributes inspector. Otherwise, you can write the code to initialize with frame and set the properties.
29+/// Current value of the stepper. Defaults to 0.
32+/// Minimum value. Must be less than maximumValue. Defaults to 0.
33+var minimumValue: Int = 0
35+/// Maximum value. Must be more than minimumValue. Defaults to 10.
36+var maximumValue: Int = 10
38+/// Text on the left button. Be sure that it fits in the button. Defaults to "-".
39+var leftButtonText: String = "-"
41+/// Text on the right button. Be sure that it fits in the button. Defaults to "+".
42+var rightButtonText: String = "+"
44+/// Text color of the buttons. Defaults to white
45+var buttonsTextColor: UIColor = UIColor.whiteColor()
47+/// Background color of the buttons. Defaults to dark blue.
48+var buttonsBackgroundColor: UIColor = UIColor(red:0.21, green:0.5, blue:0.74, alpha:1)
50+/// Font of the buttons. Defaults to AvenirNext-Bold, 20.0 points in size.
51+var buttonsFont = UIFont(name: "AvenirNext-Bold", size: 20.0)
53+/// Text color of the middle label. Defaults to white.
54+var labelTextColor: UIColor = UIColor.whiteColor()
56+/// Text color of the middle label. Defaults to lighter blue.
57+var labelBackgroundColor: UIColor = UIColor(red:0.26, green:0.6, blue:0.87, alpha:1)
59+/// Font of the middle label. Defaults to AvenirNext-Bold, 25.0 points in size.
60+var labelFont = UIFont(name: "AvenirNext-Bold", size: 25.0)
62+/// Corner radius of the stepper's layer. Defaults to 4.0.
63+var cornerRadius: CGFloat = 4.0
65+/// Percentage of the middle label's width. Must be between 0 and 1. Defaults to 0.5. Be sure that it is wide enough to show the value.
66+var labelWidthWeight: CGFloat = 0.5
68+/// Color of the flashing animation on the buttons in case the value hit the limit.
69+var limitHitAnimationColor: UIColor = UIColor(red:0.26, green:0.6, blue:0.87, alpha:1)
75+Günay Mert Karadoğan, mertkaradogan@gmail.com
79+GMStepper is available under the MIT license. See the LICENSE file for more info.