UITableView为iPhone 4s和iPhone 5提供不同的输出(都有iOS 6)
我已经创建了一个iPhone应用程序,在其中我有UITableView,我正在显示用户列表 我的代码是UITableView为iPhone 4s和iPhone 5提供不同的输出(都有iOS 6),ios,objective-c,uitableview,iphone-5,Ios,Objective C,Uitableview,Iphone 5,我已经创建了一个iPhone应用程序,在其中我有UITableView,我正在显示用户列表 我的代码是 -(UITableViewCell *) tableView:(UITableView *) tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { // new is JSON data of list of users... news = [NSJSONSerialization JSONObjectWithD
-(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;
}
现在当我添加/删除一些用户时
在iphone4s或以下的中,它会给我更新的列表
然而,在iPhone 5中,它给了我以前的列表数据(与以前的数据相同)。删除的数据不会从列表中删除,新添加的用户也不会显示在列表中
注意:
当我使用iPhone5模拟器在模拟器中运行这个应用程序时,它工作正常
我有适当的delegate和一切,因为它与iphone4s及以下完美配合。问题在于iphone5
你知道为什么iPhone5会有这种奇怪的行为吗
编辑1 我在这个应用程序中看到的最令人震惊的事情是,当我在iPhone 5上运行应用程序并在UITableView中添加数据时看到NSLog,我看到的NSLog和以前一样。。。e、 即使没有ID5数据,我仍然看到ID5 知道为什么会这样吗这真让我抓狂…
编辑2 现在又一个令人震惊的消息是,当我在朋友iPhone5上试用时,效果非常好*但不在客户端iPhone 5上,现在也在iPhone 4上
知道为什么会发生这种奇怪的情况吗?需要更多的调试信息。在两个平台上记录
新闻的内容。@Robert:当我检查NSLog时,我看到的id和以前一样。。。即使这些都不存在于数据库中。。。