У меня есть UITableView
, и я показываю данные на основе indexPath.section
, однако, когда я очень быстро прокручиваю свое табличное представление, его данные продолжают перекрываться.Как это исправить?
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
switch(indexPath.section)
{
// case 0 to 10;
//values change if I scroll my table
}
}