0
私は3つのタブを持つtabViewControllerを持っていますが、それぞれ独自のviewControllerを持っています。 私は、ナビゲーションバーのuibarbuttonを作成し、上記のコードはエラーになりませんが、それはどちらか何もしないのUIViewControllerの1どのように特定のUIViewControllerでTabViewController内のメソッドを呼び出すにはナビゲーションバーのボタン
UIBarButtonItem *deleteButton = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemTrash
target:self
action:@selector(deleteAction:)];
deleteButton.style = UIBarButtonItemStyleBordered;
[buttons addObject:deleteButton];
-(void)deleteAction:(id)sender
{
NotesViewController *notesViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"Notes"];
[notesViewController.tableView setEditing:TRUE];
}
上のメソッドを呼び出すしたいと思います。