简体   繁体   English

在iOS7中刷新UITableView scrollIndicators

[英]Flashing UITableView scrollIndicators in iOS7

In iOS6 I use to have a trick to get the scroll indicators to flash in a UITableView : 在iOS6中,我经常使用技巧来使滚动指示器在UITableView闪烁:

- (void)didMoveToSuperview
{
    if (self.superview)
    {
        [self performSelector:@selector(flashScrollIndicators) withObject:nil afterDelay:0];
    }
}

However in iOS7 this seems to not work anymore (it worked in iOS 6), and neither does just doing: [self flashScrollIndicators] . 但是,在iOS7中,这似乎不再起作用(在iOS 6中有效),并且也没有这样做: [self flashScrollIndicators]

Has anyone figured out a way to get the scroll indicators to flash in iOS7? 有没有人想办法让滚动指示器在iOS7中闪烁?

My guess is that it's a sequence problem, ie you're populating the table after it moves to superview. 我的猜测是,这是一个序列问题,即您在移到超级视图之后填充表。 To fix the issue, either: 要解决此问题,请执行以下任一操作:

  1. Populate the table earlier in the process like viewDidLoad 在像viewDidLoad这样的过程中更早地填充表
  2. Explicitly flash the indicators after the table has been populated 填充表格后,显式闪烁指示器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM