Skip to content

Commit

Permalink
Fix objective-c demo project
Browse files Browse the repository at this point in the history
  • Loading branch information
CooperRS committed Oct 31, 2016
1 parent 4b3e362 commit 99d60ec
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Extern/RMActionController
36 changes: 36 additions & 0 deletions RMDateSelectionViewController-Demo.xcodeproj/project.pbxproj
Expand Up @@ -26,6 +26,8 @@
CA300A091BF0E6A200EAD920 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CA300A071BF0E6A200EAD920 /* LaunchScreen.storyboard */; };
CA300A0F1BF0E73800EAD920 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA300A0E1BF0E73800EAD920 /* ViewController.swift */; };
CA52EE301AC42C760032E877 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CA52EE2F1AC42C760032E877 /* MainInterface.storyboard */; };
CA6097531DC77017008B59FD /* RMActionController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA2C5C251DA26AAB00670F0F /* RMActionController.framework */; };
CA6097541DC77017008B59FD /* RMDateSelectionViewController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA2C5C101DA2699300670F0F /* RMDateSelectionViewController.framework */; };
CAA411471B01602400C24134 /* RMDateSelectionViewController-DemoExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = CA52EE281AC42C760032E877 /* RMDateSelectionViewController-DemoExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
CAA60A49181C1A0200198490 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = CAA60A48181C1A0200198490 /* main.m */; };
CAA60A4D181C1A0200198490 /* RMAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CAA60A4C181C1A0200198490 /* RMAppDelegate.m */; };
Expand Down Expand Up @@ -100,6 +102,20 @@
remoteGlobalIDString = EB60ECEB177F8DB3005A041A;
remoteInfo = "KIF Tests-OCUnit";
};
CA60974F1DC77012008B59FD /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = CAA60A31181C1A0200198490 /* Project object */;
proxyType = 1;
remoteGlobalIDString = CA2C5C241DA26AAB00670F0F;
remoteInfo = RMActionController;
};
CA6097511DC77013008B59FD /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = CAA60A31181C1A0200198490 /* Project object */;
proxyType = 1;
remoteGlobalIDString = CA2C5C0F1DA2699300670F0F;
remoteInfo = RMDateSelectionViewController;
};
CAA411451B01601D00C24134 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = CAA60A31181C1A0200198490 /* Project object */;
Expand Down Expand Up @@ -206,6 +222,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
CA6097531DC77017008B59FD /* RMActionController.framework in Frameworks */,
CA6097541DC77017008B59FD /* RMDateSelectionViewController.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -462,6 +480,8 @@
buildRules = (
);
dependencies = (
CA6097501DC77012008B59FD /* PBXTargetDependency */,
CA6097521DC77013008B59FD /* PBXTargetDependency */,
);
name = "RMDateSelectionViewController-DemoExtension";
productName = "RMDateSelectionViewController-DemoExtension";
Expand Down Expand Up @@ -743,6 +763,16 @@
target = CA2C5C241DA26AAB00670F0F /* RMActionController */;
targetProxy = CA2C5C311DA26AB900670F0F /* PBXContainerItemProxy */;
};
CA6097501DC77012008B59FD /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = CA2C5C241DA26AAB00670F0F /* RMActionController */;
targetProxy = CA60974F1DC77012008B59FD /* PBXContainerItemProxy */;
};
CA6097521DC77013008B59FD /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = CA2C5C0F1DA2699300670F0F /* RMDateSelectionViewController */;
targetProxy = CA6097511DC77013008B59FD /* PBXContainerItemProxy */;
};
CAA411461B01601D00C24134 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = CA52EE271AC42C760032E877 /* RMDateSelectionViewController-DemoExtension */;
Expand Down Expand Up @@ -778,6 +808,7 @@
CA2C5C1A1DA2699400670F0F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_SUSPICIOUS_MOVES = YES;
Expand Down Expand Up @@ -807,6 +838,7 @@
CA2C5C1B1DA2699400670F0F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_SUSPICIOUS_MOVES = YES;
Expand Down Expand Up @@ -837,6 +869,7 @@
CA2C5C2F1DA26AAB00670F0F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_SUSPICIOUS_MOVES = YES;
Expand Down Expand Up @@ -865,6 +898,7 @@
CA2C5C301DA26AAB00670F0F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_SUSPICIOUS_MOVES = YES;
Expand Down Expand Up @@ -1125,6 +1159,7 @@
CA2C5C1B1DA2699400670F0F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
CA2C5C2E1DA26AAB00670F0F /* Build configuration list for PBXNativeTarget "RMActionController" */ = {
isa = XCConfigurationList;
Expand All @@ -1133,6 +1168,7 @@
CA2C5C301DA26AAB00670F0F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
CA300A0B1BF0E6A200EAD920 /* Build configuration list for PBXNativeTarget "RMDateSelectionViewController-SwiftDemo" */ = {
isa = XCConfigurationList;
Expand Down
16 changes: 8 additions & 8 deletions RMDateSelectionViewController-Demo/RMViewController.m
Expand Up @@ -44,11 +44,11 @@ - (IBAction)openDateSelectionController:(id)sender {
style = RMActionControllerStyleBlack;
}

RMAction<RMActionController<UIDatePicker *> *> *selectAction = [RMAction<RMActionController<UIDatePicker *> *> actionWithTitle:@"Select" style:RMActionStyleDone andHandler:^(RMActionController<UIDatePicker *> *controller) {
RMAction<UIDatePicker *> *selectAction = [RMAction<UIDatePicker *> actionWithTitle:@"Select" style:RMActionStyleDone andHandler:^(RMActionController<UIDatePicker *> *controller) {
NSLog(@"Successfully selected date: %@", controller.contentView.date);
}];

RMAction<RMActionController<UIDatePicker *> *> *cancelAction = [RMAction<RMActionController<UIDatePicker *> *> actionWithTitle:@"Cancel" style:RMActionStyleCancel andHandler:^(RMActionController<UIDatePicker *> *controller) {
RMAction<UIDatePicker *> *cancelAction = [RMAction<UIDatePicker *> actionWithTitle:@"Cancel" style:RMActionStyleCancel andHandler:^(RMActionController<UIDatePicker *> *controller) {
NSLog(@"Date selection was canceled");
}];

Expand All @@ -59,35 +59,35 @@ - (IBAction)openDateSelectionController:(id)sender {
[dateSelectionController addAction:selectAction];
[dateSelectionController addAction:cancelAction];

RMAction<RMActionController<UIDatePicker *> *> *in15MinAction = [RMAction<RMActionController<UIDatePicker *> *> actionWithTitle:@"15 Min" style:RMActionStyleAdditional andHandler:^(RMActionController<UIDatePicker *> *controller) {
RMAction<UIDatePicker *> *in15MinAction = [RMAction<UIDatePicker *> actionWithTitle:@"15 Min" style:RMActionStyleAdditional andHandler:^(RMActionController<UIDatePicker *> *controller) {
controller.contentView.date = [NSDate dateWithTimeIntervalSinceNow:15*60];
NSLog(@"15 Min button tapped");
}];
in15MinAction.dismissesActionController = NO;

RMAction<RMActionController<UIDatePicker *> *> *in30MinAction = [RMAction<RMActionController<UIDatePicker *> *> actionWithTitle:@"30 Min" style:RMActionStyleAdditional andHandler:^(RMActionController<UIDatePicker *> *controller) {
RMAction<UIDatePicker *> *in30MinAction = [RMAction<UIDatePicker *> actionWithTitle:@"30 Min" style:RMActionStyleAdditional andHandler:^(RMActionController<UIDatePicker *> *controller) {
controller.contentView.date = [NSDate dateWithTimeIntervalSinceNow:30*60];
NSLog(@"30 Min button tapped");
}];
in30MinAction.dismissesActionController = NO;

RMAction<RMActionController<UIDatePicker *> *> *in45MinAction = [RMAction<RMActionController<UIDatePicker *> *> actionWithTitle:@"45 Min" style:RMActionStyleAdditional andHandler:^(RMActionController<UIDatePicker *> *controller) {
RMAction<UIDatePicker *> *in45MinAction = [RMAction<UIDatePicker *> actionWithTitle:@"45 Min" style:RMActionStyleAdditional andHandler:^(RMActionController<UIDatePicker *> *controller) {
controller.contentView.date = [NSDate dateWithTimeIntervalSinceNow:45*60];
NSLog(@"45 Min button tapped");
}];
in45MinAction.dismissesActionController = NO;

RMAction<RMActionController<UIDatePicker *> *> *in60MinAction = [RMAction<RMActionController<UIDatePicker *> *> actionWithTitle:@"60 Min" style:RMActionStyleAdditional andHandler:^(RMActionController<UIDatePicker *> *controller) {
RMAction<UIDatePicker *> *in60MinAction = [RMAction<UIDatePicker *> actionWithTitle:@"60 Min" style:RMActionStyleAdditional andHandler:^(RMActionController<UIDatePicker *> *controller) {
controller.contentView.date = [NSDate dateWithTimeIntervalSinceNow:60*60];
NSLog(@"60 Min button tapped");
}];
in60MinAction.dismissesActionController = NO;

RMGroupedAction<RMActionController<UIDatePicker *> *> *groupedAction = [RMGroupedAction<RMActionController<UIDatePicker *> *> actionWithStyle:RMActionStyleAdditional andActions:@[in15MinAction, in30MinAction, in45MinAction, in60MinAction]];
RMGroupedAction<UIDatePicker *> *groupedAction = [RMGroupedAction<UIDatePicker *> actionWithStyle:RMActionStyleAdditional andActions:@[in15MinAction, in30MinAction, in45MinAction, in60MinAction]];

[dateSelectionController addAction:groupedAction];

RMAction<RMActionController<UIDatePicker *> *> *nowAction = [RMAction<RMActionController<UIDatePicker *> *> actionWithTitle:@"Now" style:RMActionStyleAdditional andHandler:^(RMActionController<UIDatePicker *> * _Nonnull controller) {
RMAction<UIDatePicker *> *nowAction = [RMAction<UIDatePicker *> actionWithTitle:@"Now" style:RMActionStyleAdditional andHandler:^(RMActionController<UIDatePicker *> * _Nonnull controller) {
controller.contentView.date = [NSDate date];
NSLog(@"Now button tapped");
}];
Expand Down

0 comments on commit 99d60ec

Please sign in to comment.