Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #357 by adding XL_APP_EXTENSIONS macro so that XLForm can be used in App Extensions #523

Merged
merged 3 commits into from
May 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -265,6 +265,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 @@ -278,6 +279,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 @@ -315,6 +317,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 @@ -328,6 +331,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 @@ -482,6 +482,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 @@ -491,6 +492,7 @@ -(void)showFormValidationError:(NSError *)error
[alertView show];
}
#endif
#endif
}

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