gpt4 book ai didi

iOS应用程序退出而没有日志

转载 作者:行者123 更新时间:2023-12-03 17:39:11 24 4
gpt4 key购买 nike

我正在调试一个 iOS 应用程序。

当我跑

        ProductListViewController *pListController = [[ProductListViewController alloc] initWithStyle:UITableViewStylePlain];
pListController.title = @"我的收藏";
//pListController.product=self.product;
pListController.opeType = Get_MyCollect;
[self.navigationController pushViewController:pListController animated:YES];

我的应用程序退出时没有在我的 Xcode 输出中打印任何内容?

任何的想法?

我在编辑方案中打开所有选项

也没有更多的信息打印。

enter image description here

最佳答案

您有一个名为 ProductListViewController 的自定义 UITableViewController,并像这样实例化它:

[[ProductListViewController alloc] initWithStyle:UITableViewStylePlain];

问题是您还有一个 ProductListViewController Nib 。在 iOS 6(不是 iOS 5 及之前的版本)中,当您说出上述代码行时,此 Nib 会自动加载为您的 ProductListViewController View Controller 的 Nib 。因此 ProductListViewController 必须是 nib 的所有者及其 view及其 tableView必须是 Nib 中的 UITableView。

或者,只需更改 nib 的名称,或删除 nib(并重建项目文件夹)!现在您的 UITableViewController 将创建自己的 UITableView。

关于iOS应用程序退出而没有日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15754906/

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