Skip to content

Commit

Permalink
added reDraw logic and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
superbderrick committed Oct 3, 2017
1 parent c490311 commit 4752ca6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ Instantiate and customize it (again, take a look at -Customization- section). Fi
```
let testRect1 = CGRect(x:30 ,y:70 , width:300 ,height:30)
var secondArray = Array<Float>()
var marksArray1 = Array<Float>()
marksArray1 = [0,10,20,30,40,50,60,70,80,90,100]
secondSlider = SummerSlider(frame: testRect1)
secondSlider.selectedBarColor = UIColor.blue
secondSlider.unselectedBarColor = UIColor.red
secondSlider.markColor = UIColor.yellow
secondSlider.markWidth = 2.0
secondSlider.markPositions = secondArray
secondSlider.markPositions = marksArray1
self.view.addSubview(secondSlider)
```

Expand Down
4 changes: 4 additions & 0 deletions SummerSlider/SummerSlider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ import UIKit
super.init(coder: aDecoder)
self.setupDefaultValues()
}

public func reDraw() {
self.setNeedsDisplay()
}

override public func draw(_ rect: CGRect) {
super.draw(rect)
Expand Down

0 comments on commit 4752ca6

Please sign in to comment.