我有一个应用程序,我在其中使用了 slider icarousel .在 slider 下方,我有事件列表。当我点击事件时,它会转到事件详细信息。
我注意到,如果我从列表转到事件详细信息并从详细信息屏幕单击返回按钮,我的 iPhone 正在重启。
只有 iPhone 6 及更高版本的设备才会出现这种情况。
Click to see the stacktrace
因为它很大,我提供链接。
补充一下,我还在 UITableView 上使用了 UIRefreshControl
。以下是我使用的代码。
refreshControl = [[UIRefreshControl alloc]init];
[mainTableView addSubview:refreshControl];
[refreshControl addTarget:self action:@selector(refreshTable) forControlEvents:UIControlEventValueChanged];
-(void) refreshTable {
[indicator startAnimating];
indexCounter.text = @"0";
indexCounter.hidden = YES;
occasionsArray = [[NSMutableArray alloc] init];
actualOccasionsArray = [[NSMutableArray alloc] init];
mainOccasionsArray = [[NSMutableArray alloc] init];
[refreshControl endRefreshing];
[mainTableView reloadData];
[self fetchHomeScreenOccassions]; // this is where I call webservice
}
最佳答案
恭喜。你有:
- 在 NSURLSession 助手守护进程中发现了一个崩溃错误
- 设法在 View 或其他项目上创建动画,该动画太大以至于导致窗口服务器崩溃。
我无法确切地告诉您您的代码是如何做到这些的,但是...我注意到的一件事是您正在对整个 TableView 进行核对,然后重新加载它。这不一定是解决此问题的最佳方法。相反,您应该加载数据,并且(假设它以一致的顺序出现)在收到项目时遍历现有数组中的项目,删除应该已经收到的任何内容并添加任何不在数组中的新项目数组还没有。
关于ios - iPhone 仅在 iPhone 6 及更高版本中重启,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37096595/