Skip to content

Commit 4c25cc5

Browse files
committed
Merge branch 'master' of github.com:ResearchKit/ResearchKit into rsanchezsaez-ipadmargins
# Conflicts: # ResearchKit/ActiveTasks/ORKAudioContentView.m # ResearchKit/Common/ORKChoiceViewCell.m # ResearchKit/Common/ORKHelpers.m # ResearchKit/Common/ORKScaleSliderView.m # ResearchKit/Common/ORKSkin.m # ResearchKit/Common/ORKSurveyAnswerCellForText.m
2 parents a487969 + 31ea790 commit 4c25cc5

File tree

331 files changed

+2548
-2823
lines changed

Some content is hidden

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

331 files changed

+2548
-2823
lines changed

ResearchKit.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2284,6 +2284,7 @@
22842284
PRODUCT_NAME = ResearchKit;
22852285
SDKROOT = iphoneos;
22862286
SKIP_INSTALL = YES;
2287+
TARGETED_DEVICE_FAMILY = "1,2";
22872288
};
22882289
name = Debug;
22892290
};
@@ -2310,6 +2311,7 @@
23102311
PRODUCT_NAME = ResearchKit;
23112312
SDKROOT = iphoneos;
23122313
SKIP_INSTALL = YES;
2314+
TARGETED_DEVICE_FAMILY = "1,2";
23132315
};
23142316
name = Release;
23152317
};

ResearchKit/Accessibility/ORKAccessibility.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929
*/
3030

31-
// Shared header for accessibility functionality.
3231

32+
// Shared header for accessibility functionality.
3333
#import "UIView+ORKAccessibility.h"
3434
#import "ORKAccessibilityFunctions.h"
35-

ResearchKit/Accessibility/ORKAccessibilityFunctions.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@
2828
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929
*/
3030

31+
3132
#import "ORKDefines.h"
3233
#import "ORKHelpers.h"
3334

35+
3436
@class ORKScaleSlider;
3537

3638
// Used to properly format values from the ORKScaleSlider.

ResearchKit/Accessibility/ORKAccessibilityFunctions.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,15 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2828
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929
*/
3030

31+
3132
#import <UIKit/UIKit.h>
3233
#import "ORKAccessibilityFunctions.h"
3334
#import "ORKAnswerFormat_Internal.h"
3435
#import "ORKScaleSlider.h"
3536
#import "ORKScaleSliderView.h"
3637
#import "UIView+ORKAccessibility.h"
3738

39+
3840
NSString *ORKAccessibilityFormatScaleSliderValue(CGFloat value, ORKScaleSlider *slider) {
3941
ORKScaleSliderView *sliderView = (ORKScaleSliderView *)[slider ork_superviewOfType:[ORKScaleSliderView class]];
4042
if (!slider || !sliderView) {

ResearchKit/Accessibility/UIView+ORKAccessibility.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@
2828
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929
*/
3030

31+
3132
#import <UIKit/UIKit.h>
3233
#import <ResearchKit/ResearchKit.h>
3334

35+
3436
NS_ASSUME_NONNULL_BEGIN
3537

3638
@interface UIView (ORKAccessibility)

ResearchKit/Accessibility/UIView+ORKAccessibility.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2828
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929
*/
3030

31+
3132
#import "UIView+ORKAccessibility.h"
3233

34+
3335
@implementation UIView (ORKAccessibility)
3436

3537
- (UIView *)ork_superviewOfType:(Class)aClass {
@@ -40,8 +42,7 @@ - (UIView *)ork_superviewOfType:(Class)aClass {
4042
id superview = [self superview];
4143
if (superview == nil) {
4244
return nil;
43-
}
44-
else if ([superview isKindOfClass:aClass]) {
45+
} else if ([superview isKindOfClass:aClass]) {
4546
return superview;
4647
}
4748

ResearchKit/ActiveTasks/CMMotionActivity+ORKJSONDictionary.m

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,23 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4848
}
4949

5050
static NSArray *activityArray(CMMotionActivity *activity) {
51-
NSMutableArray *ret = [NSMutableArray array];
51+
NSMutableArray *array = [NSMutableArray array];
5252
if (activity.unknown) {
53-
[ret addObject:kActivityUnknown];
53+
[array addObject:kActivityUnknown];
5454
}
5555
if (activity.stationary) {
56-
[ret addObject:kActivityStationary];
56+
[array addObject:kActivityStationary];
5757
}
5858
if (activity.walking) {
59-
[ret addObject:kActivityWalking];
59+
[array addObject:kActivityWalking];
6060
}
6161
if (activity.running) {
62-
[ret addObject:kActivityRunning];
62+
[array addObject:kActivityRunning];
6363
}
6464
if (activity.automotive) {
65-
[ret addObject:kActivityAutomotive];
65+
[array addObject:kActivityAutomotive];
6666
}
67-
return ret;
67+
return array;
6868
}
6969

7070

ResearchKit/ActiveTasks/ORKActiveStep.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#import <ResearchKit/ORKStep.h>
3434
#import <UIKit/UIKit.h>
3535

36+
3637
NS_ASSUME_NONNULL_BEGIN
3738

3839
/**
@@ -100,7 +101,6 @@ automatically navigates forward when the timer expires.
100101
*/
101102
@property (nonatomic) BOOL shouldSpeakCountDown;
102103

103-
104104
/**
105105
A Boolean value indicating whether to start the count down timer automatically when the step starts, or
106106
require the user to take some explicit action to start the step, such as tapping a button.
@@ -193,7 +193,6 @@ The default value of this property is `NO`.
193193
*/
194194
@property (nonatomic, copy, nullable) NSArray *recorderConfigurations;
195195

196-
197196
/**
198197
The set of HealthKit types the step requests for reading. (read-only)
199198
@@ -219,7 +218,6 @@ The default value of this property is `NO`.
219218
*/
220219
@property (nonatomic, readonly) ORKPermissionMask requestedPermissions;
221220

222-
223221
@end
224222

225223
NS_ASSUME_NONNULL_END

ResearchKit/ActiveTasks/ORKActiveStep.m

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3636
#import "ORKActiveStepViewController.h"
3737
#import "ORKRecorder_Private.h"
3838

39+
3940
@implementation ORKActiveStep
4041

4142
+ (Class)stepViewControllerClass {
@@ -52,23 +53,22 @@ - (BOOL)hasCountDown {
5253

5354
- (BOOL)hasTitle {
5455
NSString *title = self.title;
55-
return ( title != nil && title.length > 0);
56+
return (title != nil && title.length > 0);
5657
}
5758

5859
- (BOOL)hasText {
5960
NSString *text = self.text;
60-
return ( text != nil && text.length > 0);
61+
return (text != nil && text.length > 0);
6162
}
6263

6364
- (BOOL)hasVoice {
64-
return ( _spokenInstruction != nil && _spokenInstruction.length > 0);
65+
return (_spokenInstruction != nil && _spokenInstruction.length > 0);
6566
}
6667

6768
- (BOOL)isRestorable {
6869
return NO;
6970
}
7071

71-
7272
+ (BOOL)supportsSecureCoding {
7373
return YES;
7474
}
@@ -99,7 +99,6 @@ - (instancetype)copyWithZone:(NSZone *)zone {
9999
return step;
100100
}
101101

102-
103102
- (instancetype)initWithCoder:(NSCoder *)aDecoder {
104103
self = [super initWithCoder:aDecoder];
105104
if (self ) {
@@ -137,8 +136,6 @@ - (void)encodeWithCoder:(NSCoder *)aCoder {
137136
ORK_ENCODE_OBJ(aCoder, recorderConfigurations);
138137
}
139138

140-
141-
142139
- (BOOL)isEqual:(id)object {
143140
BOOL isParentSame = [super isEqual:object];
144141

@@ -159,10 +156,6 @@ - (BOOL)isEqual:(id)object {
159156
(self.shouldUseNextAsSkipButton == castObject.shouldUseNextAsSkipButton)) ;
160157
}
161158

162-
163-
164-
165-
166159
- (NSSet *)requestedHealthKitTypesForReading {
167160
NSMutableSet *set = [NSMutableSet set];
168161
for (ORKRecorderConfiguration *config in self.recorderConfigurations) {
@@ -172,7 +165,6 @@ - (NSSet *)requestedHealthKitTypesForReading {
172165
}
173166
}
174167
return set;
175-
176168
}
177169

178170
- (ORKPermissionMask)requestedPermissions {

ResearchKit/ActiveTasks/ORKActiveStepQuantityView.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,31 @@
2828
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929
*/
3030

31+
3132
#import <ResearchKit/ResearchKit_Private.h>
3233
#import "ORKLabel.h"
3334

35+
3436
NS_ASSUME_NONNULL_BEGIN
3537

3638
@interface ORKQuantityLabel : ORKLabel
3739

3840
@end
3941

42+
4043
@interface ORKActiveStepQuantityView : UIView
4144

4245
@property (nonatomic, strong, nullable) NSString *title;
4346
@property (nonatomic, strong, nullable) NSString *value;
4447
@property (nonatomic, strong, nullable) UIImage *image;
4548
@property (nonatomic) BOOL enabled;
4649

47-
4850
@property (nonatomic, strong, readonly, nullable) UILabel *titleLabel;
4951
@property (nonatomic, strong, readonly, nullable) UILabel *valueLabel;
5052

51-
5253
@end
5354

55+
5456
@interface ORKQuantityPairView : UIView
5557

5658
@property (nonatomic, strong, nullable) ORKActiveStepQuantityView *leftView;

0 commit comments

Comments
 (0)