on master help sign in
Update README for borders
commit8631f60be122d05d3acb2f6ea28e637dab4283ca authorGunay Mert Karadogan <mertkaradogan@gmail.com> dateThu 21 Apr 2016, 19:33 (10 years ago) parent31d50f8
2 files changed+12−4
.gitignore+2 README.md+10−4
.gitignore+2
@@ -31,3 +31,5 @@ DerivedData
3131# Carthage/Checkouts
3232
3333Carthage/Build
34+
35+.DS_Store
README.md+10−4
@@ -19,7 +19,7 @@ it, simply add the following lines to your Podfile:
1919use_frameworks!
2020pod "GMStepper"
2121```
22−
22+
2323## Setup
2424
2525If you want to use storyboards, 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.
@@ -27,7 +27,7 @@ If you want to use storyboards, just drop a UIView into your storyboard and set
2727## Properties
2828```swift
2929/// Current value of the stepper. Defaults to 0.
30−var value: Double = 0
30+var value: Double = 0
3131
3232/// Minimum value. Must be less than maximumValue. Defaults to 0.
3333var minimumValue: Double = 0
@@ -43,7 +43,7 @@ var autorepeat: Bool = true
4343
4444/// If the value is integer, it is shown without floating point.
4545var showIntegerIfDoubleIsInteger: Bool = true
46−
46+
4747/// Text on the left button. Be sure that it fits in the button. Defaults to "-".
4848var leftButtonText: String = "-"
4949
@@ -71,8 +71,14 @@ var labelFont = UIFont(name: "AvenirNext-Bold", size: 25.0)
7171/// Corner radius of the stepper's layer. Defaults to 4.0.
7272var cornerRadius: CGFloat = 4.0
7373
74+/// Border width of the stepper and middle label's layer. Defaults to 0.0.
75+var borderWidth: CGFloat = 0.0
76+
77+/// Color of the border of the stepper and middle label's layer. Defaults to clear color.
78+var borderColor: UIColor = UIColor.clearColor()
79+
7480/// 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.
75−var labelWidthWeight: CGFloat = 0.5
81+var labelWidthWeight: CGFloat = 0.5
7682
7783/// Color of the flashing animation on the buttons in case the value hit the limit.
7884var limitHitAnimationColor: UIColor = UIColor(red:0.26, green:0.6, blue:0.87, alpha:1)