Add shortcut for reloadRowsAtIndexPaths

This commit is contained in:
Roman Efimov
2013-06-18 12:37:54 -05:00
parent bf023936a9
commit 12f77e1085
3 changed files with 10 additions and 2 deletions

View File

@@ -68,7 +68,8 @@
//
RETableViewOptionsController *optionsController = [[RETableViewOptionsController alloc] initWithItem:item options:options multipleChoice:NO completionHandler:^{
[weakSelf.navigationController popViewControllerAnimated:YES];
[weakSelf.tableView reloadRowsAtIndexPaths:@[item.indexPath] withRowAnimation:UITableViewRowAnimationNone];
[item reloadRowWithAnimation:UITableViewRowAnimationNone]; // same as [weakSelf.tableView reloadRowsAtIndexPaths:@[item.indexPath] withRowAnimation:UITableViewRowAnimationNone];
}];
[weakSelf.navigationController pushViewController:optionsController animated:YES];
}];
@@ -86,7 +87,7 @@
// Present options controller
//
RETableViewOptionsController *optionsController = [[RETableViewOptionsController alloc] initWithItem:item options:options multipleChoice:YES completionHandler:^{
[weakSelf.tableView reloadRowsAtIndexPaths:@[item.indexPath] withRowAnimation:UITableViewRowAnimationNone];
[item reloadRowWithAnimation:UITableViewRowAnimationNone]; // same as [weakSelf.tableView reloadRowsAtIndexPaths:@[item.indexPath] withRowAnimation:UITableViewRowAnimationNone];
NSLog(@"%@", item.value);
}];
[weakSelf.navigationController pushViewController:optionsController animated:YES];