@@ -67,7 +67,7 @@ @interface BEMSimpleLineGraphView () {
6767@property (strong , nonatomic ) NSMutableArray <BEMCircle *> *circleDots;
6868
6969// / The line itself
70- @property (strong , nonatomic ) BEMLine * masterLine;
70+ @property (strong , nonatomic ) BEMLine *masterLine;
7171
7272// / The vertical line which appears when the user drags across the graph
7373@property (strong , nonatomic ) UIView *touchInputLine;
@@ -133,12 +133,12 @@ - (instancetype) initWithCoder:(NSCoder *)coder {
133133 return self;
134134}
135135
136- -(void ) decodeRestorableStateWithCoder : (NSCoder *)coder {
136+ - (void )decodeRestorableStateWithCoder : (NSCoder *)coder {
137137 [super decodeRestorableStateWithCoder: coder];
138138 [self restorePropertyWithCoder: coder];
139139}
140140
141- -(void ) restorePropertyWithCoder : (NSCoder *) coder {
141+ - (void )restorePropertyWithCoder : (NSCoder *)coder {
142142
143143#define RestoreProperty (property, type ) \
144144if ([coder containsValueForKey: @#property]) { \
@@ -192,7 +192,7 @@ -(void) restorePropertyWithCoder:(NSCoder *) coder {
192192#pragma clang diagnostic pop
193193}
194194
195- -(void ) encodeRestorableStateWithCoder : (NSCoder *)coder {
195+ - (void )encodeRestorableStateWithCoder : (NSCoder *)coder {
196196 [super encodeRestorableStateWithCoder: coder];
197197 [self encodePropertiesWithCoder: coder];
198198}
@@ -202,7 +202,7 @@ - (void) encodeWithCoder: (NSCoder *)coder {
202202 [self encodePropertiesWithCoder: coder];
203203}
204204
205- -(void ) encodePropertiesWithCoder : (NSCoder *) coder {
205+ - (void )encodePropertiesWithCoder : (NSCoder *)coder {
206206
207207#define EncodeProperty (property, type ) [coder encode ## type: self .property forKey: @#property]
208208
@@ -357,7 +357,7 @@ - (void)layoutSubviews {
357357 [self drawGraph ];
358358}
359359
360- -(void ) clearGraph {
360+ - (void )clearGraph {
361361 for (UIView * subvView in self.subviews ) {
362362 [subvView removeFromSuperview ];
363363 }
@@ -503,7 +503,7 @@ - (void)drawEntireGraph {
503503 [self drawYAxis ];
504504}
505505
506- -(CGFloat) labelWidthForValue : (CGFloat) value {
506+ - (CGFloat)labelWidthForValue : (CGFloat)value {
507507 NSDictionary *attributes = @{NSFontAttributeName : self.labelFont };
508508 NSString *valueString = [self yAxisTextForValue: value];
509509 NSString *labelString = [valueString stringByReplacingOccurrencesOfString: @" [0-9-]" withString: @" N" options: NSRegularExpressionSearch range: NSMakeRange (0 , [valueString length ])];
@@ -520,14 +520,14 @@ - (CGFloat) calculateWidestLabel {
520520 widestNumber = [self labelWidthForValue: self .frame.size.height] ;
521521 }
522522 if (self.averageLine .enableAverageLine ) {
523- return MAX (widestNumber, [self .averageLine.title sizeWithAttributes: attributes].width );
523+ return MAX (widestNumber, [self .averageLine.title sizeWithAttributes: attributes].width );
524524 } else {
525525 return widestNumber;
526526 }
527527}
528528
529529
530- -(BEMCircle *) circleDotAtIndex : (NSUInteger ) index forValue : (CGFloat) dotValue reuseNumber : (NSUInteger ) reuseNumber {
530+ - (BEMCircle *)circleDotAtIndex : (NSUInteger )index forValue : (CGFloat)dotValue reuseNumber : (NSUInteger )reuseNumber {
531531 CGFloat positionOnXAxis = numberOfPoints > 1 ?
532532 (((self.frame .size .width - self.YAxisLabelXOffset ) / (numberOfPoints - 1 )) * index) :
533533 self.frame .size .width /2 ;
@@ -895,7 +895,7 @@ - (UILabel *)xAxisLabelWithText:(NSString *)text atIndex:(NSUInteger)index reuse
895895 return labelXAxis;
896896}
897897
898- -(NSString *) yAxisTextForValue : (CGFloat) value {
898+ - (NSString *)yAxisTextForValue : (CGFloat) value {
899899 NSString *yAxisSuffix = @" " ;
900900 NSString *yAxisPrefix = @" " ;
901901
@@ -1164,7 +1164,7 @@ - (UILabel *)configureLabel: (UILabel *) oldLabel forPoint: (BEMCircle *)circleD
11641164 return newPopUpLabel;
11651165}
11661166
1167- -(void ) adjustXLocForLabel : (UIView *) popUpLabel avoidingDot : (CGRect) circleDotFrame {
1167+ - (void )adjustXLocForLabel : (UIView *) popUpLabel avoidingDot : (CGRect) circleDotFrame {
11681168
11691169 // now fixup left/right layout issues
11701170 CGFloat xCenter = CGRectGetMidX (circleDotFrame);
@@ -1185,7 +1185,7 @@ -(void) adjustXLocForLabel: (UIView *) popUpLabel avoidingDot: (CGRect) circleDo
11851185 popUpLabel.center = CGPointMake (xCenter, popUpLabel.center .y );
11861186}
11871187
1188- -(BOOL ) adjustYLocForLabel : (UIView *) popUpLabel avoidingDot : (CGRect) dotFrame andNeighbors : (CGRect) leftNeightbor and : (CGRect) secondNeighbor {
1188+ - (BOOL )adjustYLocForLabel : (UIView *)popUpLabel avoidingDot : (CGRect)dotFrame andNeighbors : (CGRect)leftNeightbor and : (CGRect)secondNeighbor {
11891189 // returns YES if it can avoid those neighbors
11901190 // note: nil.frame == CGRectZero
11911191 // check for bumping into top OR overlap with left neighbors
@@ -1209,7 +1209,6 @@ -(BOOL) adjustYLocForLabel: (UIView *) popUpLabel avoidingDot: (CGRect) dotFrame
12091209 return YES ;
12101210}
12111211
1212-
12131212- (UIImage *)graphSnapshotImage {
12141213 return [self graphSnapshotImageRenderedWhileInBackground: NO ];
12151214}
@@ -1233,7 +1232,6 @@ - (UIImage *)graphSnapshotImageRenderedWhileInBackground:(BOOL)appIsInBackground
12331232
12341233- (void )reloadGraph {
12351234 [self drawGraph ];
1236- // [self setNeedsLayout];
12371235}
12381236
12391237#pragma mark - Values
@@ -1464,7 +1462,6 @@ - (CGFloat)yPositionForDotValue:(CGFloat)dotValue {
14641462
14651463#pragma mark - Deprecated Methods
14661464
1467-
14681465 - (NSNumber *)calculatePointValueSum {
14691466 [self printDeprecationTransitionWarningForOldMethod: @" calculatePointValueSum" replacementMethod: @" calculatePointValueSumOnGraph:" newObject: @" BEMGraphCalculator" sharedInstance: YES ];
14701467 return [[BEMGraphCalculator sharedCalculator ] calculatePointValueSumOnGraph: self ];
0 commit comments