Post

Replies

Boosts

Views

Activity

Reply to How to pass reference to NSPersistentContainer to storyboard-created table view controller in objective c
@eskimo thanks. when trying to use the creator method, it looks like I'm only allowed to pass an NSCoder in the block. Can you provide an example of how I might fix this to include persistentContainer assignment? ToDoListTableViewController *todoListVC = [mainSB instantiateViewControllerWithIdentifier:@"ToDoListTableViewController" creator:^UIViewController * _Nullable(NSCoder * _Nonnull coder) { return [[ToDoListTableViewController alloc] initWithCoder:coder]; }]; todoListVC.persistentContainer = self.persistentContainer;
Topic: UI Frameworks SubTopic: UIKit Tags:
Apr ’23