0
- (void)viewWillAppear:(BOOL)animated
{
   if (_needRefresh)
    { NSLog(@"Type This If You Are IN");
        [self.myTableView reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationFade];
        _needRefresh = NO;
    }

我只想在有变化的情况下刷新我的表。[self.myTableView reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationFade];当我移至该代码时,该代码运行良好,viewController但是当我将其放入其中时,if出现了问题。我可以看到NSLogif 内部的 if 已打印,所以我不明白有什么区别以及为什么没有执行重新加载。

4

0 回答 0