0

我创建了 iPhone 应用程序,其中有 UITableView,我在其中显示用户列表。

我有代码

-(UITableViewCell *) tableView:(UITableView *) tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    // new is JSON data of list of users...
    news = [NSJSONSerialization JSONObjectWithData:data options:nil error:nil];
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MainCell"];
    if (cell==nil) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"MainCell"];
    }
    // here in cell I have code to assign data...
    return cell;
}

现在当我添加/删除一些用户时

iPhone 4s 或更低版本中,它给了我更新的列表。

但是在iPhone 5中,它给了我以前的列表数据(与以前相同的数据)。删除的数据都不会从列表中删除,新添加的用户也不会显示在列表中。

笔记:

当我使用 iPhone 5 模拟器在模拟器中运行此应用程序时,它可以正常工作。

我有适当的代表和一切,因为它与 iPhone 4s 及以下版本完美配合。只是问题在于 iPhone 5。

知道为什么 iPhone 5 会出现这种奇怪的行为吗?


编辑 1

我在这个应用程序中看到的最令人震惊的事情是,当我在 iPhone 5 上运行应用程序并在 UITableView 中添加数据时看到 NSLog,我看到的 NSLog 和以前一样……例如,即使 Id 5 数据不存在,我仍然看到 id 5 .

知道为什么会这样吗?这真的让我抓狂...


编辑 2

现在再次令人震惊的消息是,当我试用我的朋友 iPhone 5 时,它运行良好。*但不在客户端 iPhone 5 上,现在也在 iPhone 4 上

知道为什么会发生这种奇怪的事情吗?

4

0 回答 0