J'essaie de configurer un UITableView que je peux modifier. Je les méthodes suivantes mises en œuvre:Modifiable UITableView
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
mais je ne suis pas sûr de savoir comment lier l'édition à un bouton d'édition dans mon UINavigationBar. Voici mon article de bouton:
UIBarButtonItem * leftButton = [[UIBarButtonItem alloc] initWithTitle:@"Edit"
style:UIBarButtonSystemItemEdit
target:nil
action:@selector(editButtonSelected:)];
Comment puis-je obtenir ce fonctionnement?
mais ce devrait ma méthode editButtonSelected ressembler? – CodeGuy
C'est une question différente. D'abord, essayez le bouton d'édition standard. Il va définir la propriété d'édition de la vue de la table sur OUI et changer le titre et l'apparence du bouton en Terminé. – gerry3