Wednesday, September 8, 2010

Auto Refresh Table view at a certain frequency

time interval is 5sec

NSTimer *timer = [NSTimer timeWithTimeInterval:5.0
target:self
selector:@selector(reloadData:)
userInfo:nil
repeats:YES];
[NSRunLoop mainRunLoop] addTimer:timer forMode:NSDefaultRunLoopMode];

-(void)reloadData:(NSTimer*)tim {
[tableView reloadData];
}

No comments:

Post a Comment