у меня есть изображение. Ниже изображение - это табличное представление .. которое загружает данные с сервера. По умолчанию пять полей в табличном представлении видны ... работает нормально ... если я прокручиваю табличное представление для просмотра остальные поля ... скроллер восстанавливается ... что я хочу, чтобы табличное представление было исправлено, а не отбрасывалось при прокрутке ... было бы здорово, если вы, ребята, можете мне помочь ... ниже приведен код
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return [items count];
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 28.0;
}
- (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
UIView *headerView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0,
tableViewteam.bounds.size.width, 28)] autorelease];
headerView.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageWithContentsOfFile:[[NSBundle mainBundle]pathForResource:@"team"ofType:@"png"]]];
return headerView;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:CellIdentifier] autorelease];
}
cell.selectionStyle=UITableViewCellSelectionStyleNone;
cell.imageView.backgroundColor=[UIColor clearColor];
cell.textLabel.text=[[items objectAtIndex:indexPath.row]objectForKey:@"title"];
cell.textLabel.textColor=[UIColor whiteColor];
cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator;
return cell;
}