This repository has been archived by the owner on Dec 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 382
New TestBed App and multiple bug fixes/cleanups #295
Merged
Merged
Changes from 14 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
59f25dd
Add encoder/decoder for BEMLineGraph properties
mackworth 9bfe179
Add Types to all Arrays
mackworth 7823735
Create new TestBed app to manipulate almost all parameters
mackworth 7dc9f3a
Add colors, gradients, and alphas to TestBed
mackworth 78c8cac
Fix assorted bugs in BEMSimpleLineGraph, especially null-data related
mackworth a10ad12
Allow use on iPhone and Split View
mackworth 1169854
Fix bug with TouchLineInput color (doesn't change after initial setting)
mackworth 019aa1e
Bug fixes:
mackworth 0e33b98
Requested changes to PR 3295
mackworth c107658
Further fixes for more substantive comments on PR #295
mackworth e69998a
Add "Graph" button to Compact devices
mackworth 212058f
Update .travis.yml
Boris-Em 3dd033d
Remove unuseful breaking test
Boris-Em b2aff57
Merge pull request #1 from Boris-Em/PR295
mackworth fa2c33e
Fix space nit in comment
mackworth 2072327
Merge remote-tracking branch 'origin/feature' into feature
mackworth e1c6fd6
Ensure circleDots always same length as dataPoints
mackworth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
|
||
|
||
/// A line displayed horizontally across the graph at the average y-value | ||
@interface BEMAverageLine : NSObject | ||
@interface BEMAverageLine : NSObject <NSCoding> | ||
|
||
|
||
/// When set to YES, an average line will be displayed on the line graph | ||
|
@@ -35,7 +35,7 @@ | |
|
||
|
||
/// Dash pattern for the average line | ||
@property (strong, nonatomic, nullable) NSArray *dashPattern; | ||
@property (strong, nonatomic, nullable) NSArray <NSNumber *> *dashPattern; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes! Love these changes! Perfect! |
||
|
||
|
||
//Label for average line in y axis. Default is blank. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,22 +14,60 @@ - (instancetype)init { | |
self = [super init]; | ||
if (self) { | ||
_enableAverageLine = NO; | ||
_color = [UIColor whiteColor]; | ||
_alpha = 1.0; | ||
_width = 3.0; | ||
_yValue = NAN; | ||
} | ||
|
||
return self; | ||
} | ||
-(void) setLabel:(UILabel *)label { | ||
|
||
- (instancetype) initWithCoder:(NSCoder *)coder { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: extra space. |
||
|
||
#define RestoreProperty(property, type) {\ | ||
if ([coder containsValueForKey:@#property]) { \ | ||
self.property = [coder decode ## type ##ForKey:@#property ]; \ | ||
}\ | ||
} | ||
self = [self init]; | ||
#pragma clang diagnostic push | ||
#pragma clang diagnostic ignored "-Wnullable-to-nonnull-conversion" | ||
|
||
RestoreProperty (enableAverageLine, Bool); | ||
RestoreProperty (color, Object); | ||
RestoreProperty (yValue, Double); | ||
RestoreProperty (alpha, Double); | ||
RestoreProperty (width, Double); | ||
RestoreProperty (dashPattern, Object); | ||
RestoreProperty (title, Object); | ||
#pragma clang diagnostic pop | ||
|
||
//AverageLine | ||
return self; | ||
} | ||
|
||
- (void) encodeWithCoder: (NSCoder *)coder { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: extra space. |
||
|
||
#define EncodeProperty(property, type) [coder encode ## type: self.property forKey:@#property] | ||
EncodeProperty (enableAverageLine, Bool); | ||
EncodeProperty (color, Object); | ||
EncodeProperty (yValue, Float); | ||
EncodeProperty (alpha, Float); | ||
EncodeProperty (width, Float); | ||
EncodeProperty (dashPattern, Object); | ||
EncodeProperty (title, Object); | ||
} | ||
|
||
|
||
|
||
- (void)setLabel:(UILabel *)label { | ||
if (_label != label) { | ||
[_label removeFromSuperview]; | ||
_label = label; | ||
} | ||
} | ||
|
||
-(void) dealloc { | ||
- (void)dealloc { | ||
self.label= nil; | ||
} | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Love that BEMAverageLine is now also NSCoding compliant.