Skip to content

Commit 22b769b

Browse files
committed
Merge pull request ResearchKit#588 from YuanZhu-apple/convergence_merge_master
Merge convergence code into master
2 parents d7bf7a6 + 0afc202 commit 22b769b

File tree

195 files changed

+6867
-1610
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

195 files changed

+6867
-1610
lines changed

RKWorkspace.xcworkspace/contents.xcworkspacedata

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ResearchKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Pod::Spec.new do |s|
88
s.author = { 'researchkit.org' => 'http://researchkit.org' }
99
s.source = { :git => 'https://github.com/ResearchKit/ResearchKit.git', :tag => s.version.to_s }
1010
s.public_header_files = `./scripts/find_headers.rb --public --private`.split("\n")
11-
s.source_files = 'ResearchKit/**/*.{h,m}'
11+
s.source_files = 'ResearchKit/**/*.{h,m,swift}'
1212
s.resources = 'ResearchKit/**/*.{fsh,vsh}', 'ResearchKit/Animations/**/*.m4v', 'ResearchKit/Artwork.xcassets', 'ResearchKit/Localized/*.lproj'
1313
s.platform = :ios, '8.0'
1414
s.requires_arc = true

ResearchKit.xcodeproj/project.pbxproj

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@
7777
2441034F1B966D4C00EEAB0C /* ORKPasscodeViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2441034D1B966D4C00EEAB0C /* ORKPasscodeViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
7878
244103501B966D4C00EEAB0C /* ORKPasscodeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2441034E1B966D4C00EEAB0C /* ORKPasscodeViewController.m */; };
7979
244EFAD21BCEFD83001850D9 /* ORKAnswerFormat_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 244EFAD11BCEFD83001850D9 /* ORKAnswerFormat_Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
80-
246D15D81BA3438A009C99FC /* ORKEligibilitySelectionView.h in Headers */ = {isa = PBXBuildFile; fileRef = 246D15D61BA3438A009C99FC /* ORKEligibilitySelectionView.h */; };
81-
246D15D91BA3438A009C99FC /* ORKEligibilitySelectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 246D15D71BA3438A009C99FC /* ORKEligibilitySelectionView.m */; };
82-
246D15E21BA4EE49009C99FC /* ORKSurveyAnswerCellForEligibility.h in Headers */ = {isa = PBXBuildFile; fileRef = 246D15E01BA4EE49009C99FC /* ORKSurveyAnswerCellForEligibility.h */; };
83-
246D15E31BA4EE49009C99FC /* ORKSurveyAnswerCellForEligibility.m in Sources */ = {isa = PBXBuildFile; fileRef = 246D15E11BA4EE49009C99FC /* ORKSurveyAnswerCellForEligibility.m */; };
8480
24850E191BCDA9C7006E91FB /* ORKLoginStepViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 24850E171BCDA9C7006E91FB /* ORKLoginStepViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
8581
24850E1A1BCDA9C7006E91FB /* ORKLoginStepViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 24850E181BCDA9C7006E91FB /* ORKLoginStepViewController.m */; };
8682
248604061B4C98760010C8A0 /* ORKAnswerFormatTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 248604051B4C98760010C8A0 /* ORKAnswerFormatTests.m */; };
@@ -491,7 +487,7 @@
491487
CA8D0E931BC4360F00BED0F7 /* ORKWaitStepView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8D0E911BC4360F00BED0F7 /* ORKWaitStepView.m */; };
492488
CB16A6F01BB0D0960043CDD8 /* ORKWaitStep.h in Headers */ = {isa = PBXBuildFile; fileRef = CB16A6EC1BB0D0960043CDD8 /* ORKWaitStep.h */; settings = {ATTRIBUTES = (Public, ); }; };
493489
CB16A6F11BB0D0960043CDD8 /* ORKWaitStep.m in Sources */ = {isa = PBXBuildFile; fileRef = CB16A6ED1BB0D0960043CDD8 /* ORKWaitStep.m */; };
494-
CB16A6F21BB0D0960043CDD8 /* ORKWaitStepViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = CB16A6EE1BB0D0960043CDD8 /* ORKWaitStepViewController.h */; settings = {ATTRIBUTES = (Private, ); }; };
490+
CB16A6F21BB0D0960043CDD8 /* ORKWaitStepViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = CB16A6EE1BB0D0960043CDD8 /* ORKWaitStepViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
495491
CB16A6F31BB0D0960043CDD8 /* ORKWaitStepViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CB16A6EF1BB0D0960043CDD8 /* ORKWaitStepViewController.m */; };
496492
CBD34A561BB1FB9000F204EA /* ORKLocationSelectionView.h in Headers */ = {isa = PBXBuildFile; fileRef = CBD34A541BB1FB9000F204EA /* ORKLocationSelectionView.h */; };
497493
CBD34A571BB1FB9000F204EA /* ORKLocationSelectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = CBD34A551BB1FB9000F204EA /* ORKLocationSelectionView.m */; };
@@ -587,10 +583,6 @@
587583
2441034D1B966D4C00EEAB0C /* ORKPasscodeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORKPasscodeViewController.h; sourceTree = "<group>"; };
588584
2441034E1B966D4C00EEAB0C /* ORKPasscodeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORKPasscodeViewController.m; sourceTree = "<group>"; };
589585
244EFAD11BCEFD83001850D9 /* ORKAnswerFormat_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORKAnswerFormat_Private.h; sourceTree = "<group>"; };
590-
246D15D61BA3438A009C99FC /* ORKEligibilitySelectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORKEligibilitySelectionView.h; sourceTree = "<group>"; };
591-
246D15D71BA3438A009C99FC /* ORKEligibilitySelectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORKEligibilitySelectionView.m; sourceTree = "<group>"; };
592-
246D15E01BA4EE49009C99FC /* ORKSurveyAnswerCellForEligibility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORKSurveyAnswerCellForEligibility.h; sourceTree = "<group>"; };
593-
246D15E11BA4EE49009C99FC /* ORKSurveyAnswerCellForEligibility.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORKSurveyAnswerCellForEligibility.m; sourceTree = "<group>"; };
594586
24850E171BCDA9C7006E91FB /* ORKLoginStepViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ORKLoginStepViewController.h; path = Onboarding/ORKLoginStepViewController.h; sourceTree = "<group>"; };
595587
24850E181BCDA9C7006E91FB /* ORKLoginStepViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ORKLoginStepViewController.m; path = Onboarding/ORKLoginStepViewController.m; sourceTree = "<group>"; };
596588
248604051B4C98760010C8A0 /* ORKAnswerFormatTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORKAnswerFormatTests.m; sourceTree = "<group>"; };
@@ -1737,8 +1729,6 @@
17371729
86C40BCE1A8D7C5C00081FAC /* ORKSurveyAnswerCellForText.m */,
17381730
865EA16A1ABA1BE20037C68E /* ORKSurveyAnswerCellForPicker.h */,
17391731
865EA16B1ABA1BE20037C68E /* ORKSurveyAnswerCellForPicker.m */,
1740-
246D15E01BA4EE49009C99FC /* ORKSurveyAnswerCellForEligibility.h */,
1741-
246D15E11BA4EE49009C99FC /* ORKSurveyAnswerCellForEligibility.m */,
17421732
CBD34A581BB207FC00F204EA /* ORKSurveyAnswerCellForLocation.h */,
17431733
CBD34A591BB207FC00F204EA /* ORKSurveyAnswerCellForLocation.m */,
17441734
);
@@ -1768,8 +1758,6 @@
17681758
865EA1611AB8DF750037C68E /* ORKDateTimePicker.m */,
17691759
865EA1661ABA1AA10037C68E /* ORKPicker.h */,
17701760
865EA1671ABA1AA10037C68E /* ORKPicker.m */,
1771-
246D15D61BA3438A009C99FC /* ORKEligibilitySelectionView.h */,
1772-
246D15D71BA3438A009C99FC /* ORKEligibilitySelectionView.m */,
17731761
);
17741762
name = "Control Views";
17751763
sourceTree = "<group>";
@@ -2467,7 +2455,6 @@
24672455
86C40C5E1A8D7C5C00081FAC /* ORKWalkingTaskStepViewController.h in Headers */,
24682456
BCB6E66C1B7D537B000D5B34 /* ORKRangedPoint.h in Headers */,
24692457
86C40D2C1A8D7C5C00081FAC /* ORKHeadlineLabel.h in Headers */,
2470-
246D15E21BA4EE49009C99FC /* ORKSurveyAnswerCellForEligibility.h in Headers */,
24712458
86C40D1C1A8D7C5C00081FAC /* ORKFormSectionTitleLabel.h in Headers */,
24722459
86C40CBC1A8D7C5C00081FAC /* UITouch+ORKJSONDictionary.h in Headers */,
24732460
241A2E871B94FD8800ED3B39 /* ORKPasscodeStepViewController_Internal.h in Headers */,
@@ -2485,7 +2472,6 @@
24852472
106FF2A21B665B86004EACF2 /* ORKHolePegTestPlaceStepViewController.h in Headers */,
24862473
24A4DA101B8D0F21009C797A /* ORKPasscodeStepView.h in Headers */,
24872474
86C40C9A1A8D7C5C00081FAC /* ORKDataLogger_Private.h in Headers */,
2488-
246D15D81BA3438A009C99FC /* ORKEligibilitySelectionView.h in Headers */,
24892475
861D11AD1AA7951F003C98A7 /* ORKChoiceAnswerFormatHelper.h in Headers */,
24902476
86C40C461A8D7C5C00081FAC /* ORKSpatialSpanMemoryStepViewController.h in Headers */,
24912477
86C40C521A8D7C5C00081FAC /* ORKTappingIntervalStep.h in Headers */,
@@ -2770,12 +2756,10 @@
27702756
250F94051B4C5A6600FA23EB /* ORKTowerOfHanoiStep.m in Sources */,
27712757
86C40E0A1A8D7C5C00081FAC /* ORKConsentReviewStep.m in Sources */,
27722758
BCD192E81B81243900FCC08A /* ORKPieChartLegendView.m in Sources */,
2773-
246D15D91BA3438A009C99FC /* ORKEligibilitySelectionView.m in Sources */,
27742759
86C40D1E1A8D7C5C00081FAC /* ORKFormSectionTitleLabel.m in Sources */,
27752760
250F94091B4C5AA400FA23EB /* ORKTowerOfHanoiStepViewController.m in Sources */,
27762761
86C40CF81A8D7C5C00081FAC /* ORKBorderedButton.m in Sources */,
27772762
86C40E201A8D7C5C00081FAC /* ORKConsentSignature.m in Sources */,
2778-
246D15E31BA4EE49009C99FC /* ORKSurveyAnswerCellForEligibility.m in Sources */,
27792763
86C40C601A8D7C5C00081FAC /* ORKWalkingTaskStepViewController.m in Sources */,
27802764
BCD192E01B81240400FCC08A /* ORKPieChartPieView.m in Sources */,
27812765
866F86011A96CBF3007B282C /* ORKSurveyAnswerCell.m in Sources */,

ResearchKit/ActiveTasks/ORKHolePegTestPlaceStepViewController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ - (void)saveSampleWithDistance:(CGFloat)distance {
134134
#pragma mark - hole peg test content view delegate
135135

136136
- (NSString *)stepTitle {
137-
NSString *hand = ([self holePegTestPlaceStep].movingDirection == ORKBodySagittalLeft) ? ORKLocalizedString(@"HOLE_PEG_TEST_LEFT", nil) : ORKLocalizedString(@"HOLE_PEG_TEST_RIGHT", nil);
138-
return [NSString stringWithFormat:ORKLocalizedString(@"HOLE_PEG_TEST_PLACE_INSTRUCTION_%@", nil), hand];
137+
NSString *title = ([self holePegTestPlaceStep].movingDirection == ORKBodySagittalLeft) ? ORKLocalizedString(@"HOLE_PEG_TEST_PLACE_INSTRUCTION_LEFT_HAND", nil) : ORKLocalizedString(@"HOLE_PEG_TEST_PLACE_INSTRUCTION_RIGHT_HAND", nil);
138+
return title;
139139
}
140140

141141
- (void)holePegTestPlaceDidProgress:(ORKHolePegTestPlaceContentView *)holePegTestPlaceContentView {

ResearchKit/ActiveTasks/ORKHolePegTestRemoveStepViewController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ - (void)saveSampleWithDistance:(CGFloat)distance {
140140
#pragma mark - hole peg test content view delegate
141141

142142
- (NSString *)stepTitle {
143-
NSString *hand = ([self holePegTestRemoveStep].movingDirection == ORKBodySagittalLeft) ? ORKLocalizedString(@"HOLE_PEG_TEST_RIGHT", nil) : ORKLocalizedString(@"HOLE_PEG_TEST_LEFT", nil);
144-
return [NSString stringWithFormat:ORKLocalizedString(@"HOLE_PEG_TEST_REMOVE_INSTRUCTION_%@", nil), hand];
143+
NSString *title = ([self holePegTestRemoveStep].movingDirection == ORKBodySagittalLeft) ? ORKLocalizedString(@"HOLE_PEG_TEST_REMOVE_INSTRUCTION_RIGHT_HAND", nil) : ORKLocalizedString(@"HOLE_PEG_TEST_REMOVE_INSTRUCTION_LEFT_HAND", nil);
144+
return title;
145145
}
146146

147147
- (void)holePegTestRemoveDidProgress:(ORKHolePegTestRemoveContentView *)holePegTestRemoveContentView {

ResearchKit/Charts/ORKCenteredCollectionViewLayout.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ - (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSInde
4646
NSIndexPath *lastItemIndexPath = [NSIndexPath indexPathForItem:count - 1 inSection:indexPath.section];
4747
UICollectionViewLayoutAttributes *lastItemAttributes = [super layoutAttributesForItemAtIndexPath:lastItemIndexPath];
4848
if (attributes.frame.origin.y == lastItemAttributes.frame.origin.y) {
49-
CGFloat trailing = self.collectionView.bounds.size.width - lastItemAttributes.frame.origin.x - attributes.frame.size.width;
49+
CGFloat trailing = self.collectionView.bounds.size.width - CGRectGetMaxX(lastItemAttributes.frame);
5050
attributes.frame = CGRectOffset(attributes.frame, trailing * 0.5, 0);
5151
}
5252
return attributes;

ResearchKit/Common/ORKAnswerFormat.h

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,6 @@ typedef NS_ENUM(NSInteger, ORKQuestionType) {
7979
*/
8080
ORKQuestionTypeBoolean,
8181

82-
/**
83-
The Eligibility question type asks the participant to enter Yes or No via a custom boolean control.
84-
*/
85-
ORKQuestionTypeEligibility,
86-
8782
/**
8883
In a text question, the participant can enter multiple lines of text.
8984
*/
@@ -153,7 +148,6 @@ typedef NS_ENUM(NSInteger, ORKNumberFormattingStyle) {
153148
@class ORKImageChoiceAnswerFormat;
154149
@class ORKTextChoiceAnswerFormat;
155150
@class ORKBooleanAnswerFormat;
156-
@class ORKEligibilityAnswerFormat;
157151
@class ORKNumericAnswerFormat;
158152
@class ORKTimeOfDayAnswerFormat;
159153
@class ORKDateAnswerFormat;
@@ -224,8 +218,6 @@ ORK_CLASS_AVAILABLE
224218

225219
+ (ORKBooleanAnswerFormat *)booleanAnswerFormat;
226220

227-
+ (ORKEligibilityAnswerFormat *)eligibilityAnswerFormat;
228-
229221
+ (ORKValuePickerAnswerFormat *)valuePickerAnswerFormatWithTextChoices:(NSArray<ORKTextChoice *> *)textChoices;
230222

231223
+ (ORKImageChoiceAnswerFormat *)choiceAnswerFormatWithImageChoices:(NSArray<ORKImageChoice *> *)imageChoices;
@@ -763,22 +755,6 @@ ORK_CLASS_AVAILABLE
763755
@end
764756

765757

766-
/**
767-
The `ORKEligibilityAnswerFormat` class provides a custom Boolean control that is
768-
preconfigured to use only Yes and No answers.
769-
770-
It is recommended to use an `ORKNavigableOrderedTask` along with this answer format
771-
in order to determine if the user is eligible or not. See `ORKCatalog` for an
772-
example (`Eligibility Task Example').
773-
774-
The eligibility answer format produces an `ORKBooleanQuestionResult` object.
775-
*/
776-
ORK_CLASS_AVAILABLE
777-
@interface ORKEligibilityAnswerFormat : ORKAnswerFormat
778-
779-
@end
780-
781-
782758
/**
783759
The `ORKTextChoice` class defines the text for a choice in answer formats such
784760
as `ORKTextChoiceAnswerFormat` and `ORKValuePickerAnswerFormat`.

ResearchKit/Common/ORKAnswerFormat.m

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ BOOL ORKIsAnswerEmpty(id answer) {
6262
SQT_CASE(Decimal);
6363
SQT_CASE(Integer);
6464
SQT_CASE(Boolean);
65-
SQT_CASE(Eligibility)
6665
SQT_CASE(Text);
6766
SQT_CASE(DateAndTime);
6867
SQT_CASE(TimeOfDay);
@@ -287,10 +286,6 @@ + (ORKBooleanAnswerFormat *)booleanAnswerFormat {
287286
return [ORKBooleanAnswerFormat new];
288287
}
289288

290-
+ (ORKEligibilityAnswerFormat *)eligibilityAnswerFormat {
291-
return [ORKEligibilityAnswerFormat new];
292-
}
293-
294289
+ (ORKValuePickerAnswerFormat *)valuePickerAnswerFormatWithTextChoices:(NSArray<ORKTextChoice *> *)textChoices {
295290
return [[ORKValuePickerAnswerFormat alloc] initWithTextChoices:textChoices];
296291
}
@@ -911,21 +906,6 @@ - (Class)questionResultClass {
911906
@end
912907

913908

914-
#pragma mark - ORKEligibilityAnswerFormat
915-
916-
@implementation ORKEligibilityAnswerFormat
917-
918-
- (ORKQuestionType)questionType {
919-
return ORKQuestionTypeEligibility;
920-
}
921-
922-
- (Class)questionResultClass {
923-
return [ORKBooleanQuestionResult class];
924-
}
925-
926-
@end
927-
928-
929909
#pragma mark - ORKTimeOfDayAnswerFormat
930910

931911
@implementation ORKTimeOfDayAnswerFormat

ResearchKit/Common/ORKAnswerTextField.m

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,6 @@ + (UIFont *)defaultFont {
7575

7676
#pragma mark - Accessibility
7777

78-
- (NSString *)accessibilityValue {
79-
if (self.text.length > 0) {
80-
return self.text;
81-
}
82-
return self.placeholder;
83-
}
84-
8578
- (CGRect)accessibilityFrame {
8679
UITableViewCell *containingCell = (UITableViewCell *)[self ork_superviewOfType:[UITableViewCell class]];
8780
if (containingCell != nil) {

ResearchKit/Common/ORKEligibilitySelectionView.h

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)