MXV*_*MXV 1 objective-c ios cocoapods
我正在尝试加载 Pod 中 .storyboard 中的视图控制器。我正在使用以下通常有效的方法:
UIStoryboard *storyboard = [UIStoryboard
storyboardWithName:@"StoryboardName" bundle:nil];
NewViewController *newView = [storyboard instantiateViewControllerWithIdentifier:@"NewViewController"];
[self.navigationController pushViewController:newView animated:YES];
Run Code Online (Sandbox Code Playgroud)
我需要将其更改为什么才能从 Pod 加载?
你应该用它的包标识符加载它
NSBundle* bun = [NSBundle bundleWithIdentifier:"id"]
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"StoryboardName" bundle:bun];
Run Code Online (Sandbox Code Playgroud)