Skip to content

Commit

Permalink
Merge pull request #10 from tolkachovs/master
Browse files Browse the repository at this point in the history
Display segments background color correctly
  • Loading branch information
polqf authored Jan 31, 2017
2 parents 8cd1ee3 + 9fcd0da commit 503e7ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ __highlightTextColor__: UIColor - Text color for selected segment

__segmentsBackgroundColor__: UIColor - Background color for unselected segments

__highlightTextColor__: UIColor - Background color for selected segment
__sliderBackgroundColor__: UIColor - Background color for selected segment

###Installation:
####• CocoaPods
Expand Down
3 changes: 2 additions & 1 deletion TwicketSegmentedControl/TwicketSegmentedControl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,14 @@ open class TwicketSegmentedControl: UIControl {

open var segmentsBackgroundColor: UIColor = Palette.segmentedControlBackgroundColor {
didSet {
backgroundView.backgroundColor = backgroundColor
backgroundView.backgroundColor = segmentsBackgroundColor
}
}

open var sliderBackgroundColor: UIColor = Palette.sliderColor {
didSet {
selectedContainerView.backgroundColor = sliderBackgroundColor
selectedContainerView.addShadow(with: sliderBackgroundColor)
}
}

Expand Down

0 comments on commit 503e7ce

Please sign in to comment.