Skip to content

Commit

Permalink
Fixed #357 by adding XL_APP_EXTENSIONS macro so that XLForm can be us…
Browse files Browse the repository at this point in the history
…ed in App Extensions
  • Loading branch information
tobihagemann committed Aug 25, 2015
1 parent 1738fb8 commit 15a4ce9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions XLForm/XL/Cell/XLFormLeftRightSelectorCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ -(void)leftButtonPressed:(UIButton *)leftButton

[self.formViewController presentViewController:alertController animated:YES completion:nil];
}
#ifndef XL_APP_EXTENSIONS
else{
UIActionSheet * actionSheet = [[UIActionSheet alloc] initWithTitle:self.rowDescriptor.selectorTitle
delegate:self cancelButtonTitle:nil
Expand All @@ -231,6 +232,7 @@ -(void)leftButtonPressed:(UIButton *)leftButton

}
#endif
#endif
}

#if __IPHONE_OS_VERSION_MIN_REQUIRED < 80000
Expand Down
4 changes: 4 additions & 0 deletions XLForm/XL/Cell/XLFormSelectorCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ -(void)formDescriptorCellDidSelectedWithFormController:(XLFormViewController *)c
}
[self.formViewController presentViewController:alertController animated:YES completion:nil];
}
#ifndef XL_APP_EXTENSIONS
else{
UIActionSheet * actionSheet = [[UIActionSheet alloc] initWithTitle:self.rowDescriptor.selectorTitle
delegate:self
Expand All @@ -279,6 +280,7 @@ -(void)formDescriptorCellDidSelectedWithFormController:(XLFormViewController *)c
actionSheet.tag = [self.rowDescriptor hash];
[actionSheet showInView:controller.view];
}
#endif
#endif
[controller.tableView deselectRowAtIndexPath:[controller.form indexPathOfFormRow:self.rowDescriptor] animated:YES];
}
Expand Down Expand Up @@ -316,6 +318,7 @@ -(void)formDescriptorCellDidSelectedWithFormController:(XLFormViewController *)c
[controller presentViewController:alertController animated:YES completion:nil];

}
#ifndef XL_APP_EXTENSIONS
else{
UIAlertView * alertView = [[UIAlertView alloc] initWithTitle:self.rowDescriptor.selectorTitle
message:nil
Expand All @@ -329,6 +332,7 @@ -(void)formDescriptorCellDidSelectedWithFormController:(XLFormViewController *)c
alertView.tag = [self.rowDescriptor hash];
[alertView show];
}
#endif
#endif
[controller.tableView deselectRowAtIndexPath:[controller.form indexPathOfFormRow:self.rowDescriptor] animated:YES];
}
Expand Down
2 changes: 2 additions & 0 deletions XLForm/XL/Controllers/XLFormViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ -(void)showFormValidationError:(NSError *)error
handler:nil]];
[self presentViewController:alertController animated:YES completion:nil];
}
#ifndef XL_APP_EXTENSIONS
else{
UIAlertView * alertView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"XLFormViewController_ValidationErrorTitle", nil)
message:error.localizedDescription
Expand All @@ -486,6 +487,7 @@ -(void)showFormValidationError:(NSError *)error
[alertView show];
}
#endif
#endif
}

-(void)performFormSelector:(SEL)selector withObject:(id)sender
Expand Down

0 comments on commit 15a4ce9

Please sign in to comment.