File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
Pod ::Spec . new do |s |
2
2
3
3
s . name = "LMGaugeView"
4
- s . version = "1.0.1 "
4
+ s . version = "1.0.2 "
5
5
s . summary = "LMGaugeView is a simple and customizable gauge control for iOS."
6
6
s . homepage = "https://github.com/lminhtm/LMGaugeView"
7
7
s . license = 'MIT'
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ - (void)strokeGauge
127
127
/* !
128
128
* Set progress for ring layer
129
129
*/
130
- CGFloat progress = self.maxValue ? (self.value - self.minValue )/self.maxValue : 0 ;
130
+ CGFloat progress = self.maxValue ? (self.value - self.minValue )/( self.maxValue - self. minValue ) : 0 ;
131
131
self.progressLayer .strokeEnd = progress;
132
132
133
133
/* !
@@ -183,7 +183,7 @@ - (void)drawRect:(CGRect)rect
183
183
for (int j = 0 ; j <= self.numOfSubDivisions && self.numOfSubDivisions != 0 ; j++)
184
184
{
185
185
// Subdivisions
186
- CGFloat value = i * self.divisionUnitValue + j * self.divisionUnitValue /self.numOfSubDivisions ;
186
+ CGFloat value = i * self.divisionUnitValue + j * self.divisionUnitValue /self.numOfSubDivisions + self. minValue ;
187
187
CGFloat angle = [self angleFromValue: value];
188
188
CGPoint dotCenter = CGPointMake (dotRadius * cos (angle) + center.x , dotRadius * sin (angle) + center.y );
189
189
[self drawDotAtContext: context
@@ -194,7 +194,7 @@ - (void)drawRect:(CGRect)rect
194
194
}
195
195
196
196
// Divisions
197
- CGFloat value = i * self.divisionUnitValue ;
197
+ CGFloat value = i * self.divisionUnitValue + self. minValue ;
198
198
CGFloat angle = [self angleFromValue: value];
199
199
CGPoint dotCenter = CGPointMake (dotRadius * cos (angle) + center.x , dotRadius * sin (angle) + center.y );
200
200
[self drawDotAtContext: context
You can’t perform that action at this time.
0 commit comments