diff --git a/README.md b/README.md index 480c18f..4a37fd6 100644 --- a/README.md +++ b/README.md @@ -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() +var marksArray1 = Array() 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) ``` diff --git a/SummerSlider/SummerSlider.swift b/SummerSlider/SummerSlider.swift index 415ace7..6265022 100644 --- a/SummerSlider/SummerSlider.swift +++ b/SummerSlider/SummerSlider.swift @@ -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)