开发者

how can i refresh Particular UITabeviewCell through NSTimer?

how can i refresh Particular UITabeviewCell through NSTimer? is it possibl开发者_如何学编程e? any help pls?


Well, you could just call the reloadData method of your UITableView. It will only refresh visible cells. There's also reloadRowsAtIndexPaths:withRowAnimation in OS 3.0+

The easiest approach if you don't have special needs would be: (assuming myTableView has a pointer to your UITableView)

NSTimeInterval someDelay = 5; // seconds
[myTableView performSelector:@selector(reloadData) withObject:nil
    afterDelay:someDelay];

If your ViewController could disappear before the performSelector fires, be safe and call:

[NSObject cancelPreviousPerformRequestsWithTarget:myTableView
    selector:@selector(reloadData) object:nil];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜