こんにちは私はtableView
私の視野の中にあります。しかし、ナビゲーションバーでの編集がtableViewで機能するようにしたいと思います。これを行う方法を教えてください。
メインビュー用にナビゲーションバーを設定しtableView
、同様に設定しました。
ナビゲーションバーの作成メソッドを作成しました。
- (UINavigationBar *)createNavigationBar
{
UINavigationItem *title = [[UINavigationItem alloc] initWithTitle:@"Task Manager"];
UINavigationBar *new = [[UINavigationBar alloc] initWithFrame:CGRectMake(0, 0, 320, 44)];
UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemEdit target:self action:nil];
title.leftBarButtonItem = addButton;
[new pushNavigationItem:title animated:YES];
UIColor *color = UIColorFromRGB(0xff8c00); // Dark orange
new.tintColor = color;
return new;
}
私が持っています
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
同様に設定します。
基本的に、メインナビゲーションバーの編集ボタンをタップしたときに、サブテーブルビューに赤い円が表示される必要があります。
はっきりしなかったらごめんなさい。説明が必要な場合は、私に尋ねてください。
ありがとう!:)