I am working on a custom table view design that uses images for the table row actions that appear when swiping on the table row. New to iOS 11 there is:
- (UISwipeActionsConfiguration *)tableView:(UITableView *)tableView leadingSwipeActionsConfigurationForRowAt:(NSIndexPath *)indexPath {
There is an image property availale for the context action class. E.g.
UIContextualAction *exportSongAction = [UIContextualAction contextualActionWithStyle:UIContextualActionStyleNormal title:nil handler:^(UIContextualAction* action, __kindof UIView* sourceView, void (^ _Nonnull completionHandler)(BOOL)) {
completionHandler(TRUE);
}];
exportSongAction.image = [UIImage imageNamed:@"row_export"];
How can I support this new table view method and also keep using
-(NSArray <UITableViewRowAction *> *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {
on devices not running iOS 11? I was adding compile checks & run-time iOS checks.
Does using a swipe configuraiton work with the "can edit" delegate method or not?
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {