gpt4 book ai didi

iphone - PushViewController 导致黑屏

转载 作者:太空狗 更新时间:2023-10-30 03:21:42 25 4
gpt4 key购买 nike

SettingsViewController *viewController = [[SettingsViewController alloc] init];
[[self navigationController] pushViewController:viewController animated:YES];

在 NavigationController 中使用此代码时,显示的场景只是黑屏。在 Storyboard 中显示内容,但不显示在手机上。

最佳答案

试试这个:

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle: nil];
SettingsViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"setting"];
[self.navigationController pushViewController:viewController animated:YES];

设置settingviewcontroller的标识符为“setting”

关于iphone - PushViewController 导致黑屏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14929039/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com