안녕 테이블 테이블 셀이 유선 응답을 보여줍니다 .. i가 ai에 각 셀의 단추 및 진행률 표시 줄이있는 coustom 테이블 테이블 뷰가 있습니다 ... 책을 다운로드 할 때 클릭 한 다음 내가 내가 두 번째 세포의 버튼 진행률 표시 줄이 2 셀 및 4 셀에 표시되어 클릭하면 진행 표시 줄이 나는 매우 혼란이와 사전테이블 셀의 진행 표시 줄
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *simpleTableIdentifier = @"Categorycell";
Categorycell *cell = (Categorycell *)[tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
if (cell == nil)
{
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"Categorycell" owner:self options:nil];
cell = [nib objectAtIndex:0];
}
[tableView setSeparatorColor:[UIColor clearColor]];
cell.selectionStyle=UITableViewCellSelectionStyleNone;
cell.cell_btn.tag = indexPath.row*10+1;
[cell.cell_btn addTarget:self action:@selector(btnDown:) forControlEvents:UIControlEventTouchUpInside];
cell.cell_ReadBtn.tag =indexPath.row*10+1;
[cell.cell_ReadBtn addTarget:self action:@selector(btnRead:) forControlEvents:UIControlEventTouchUpInside];
cell.cell_Progress.tag= indexPath.row*10+1;
if(!bIspress)
{
cell.cell_Progress.hidden=YES;
}
NSString *comicbook_id = [arr_comic_id objectAtIndex:indexPath.row];
NSString *filePath = [NSString stringWithFormat:@"book_%@.pdf",comicbook_id];
NSLog(@"Book Name : %@",filePath);
if(![appDelegate check_Book_available:filePath])
{
NSLog(@"Book Name Not : %@",filePath);
cell.cell_ReadBtn.hidden=YES;
cell.cell_btn.hidden= NO;
}
else
{
cell.cell_btn.hidden=YES;
cell.cell_ReadBtn.hidden=NO;
}
cell.tag=indexPath.row*10+1;
return cell;
}
-(void)btnDown:(UIButton*)sender
{
NSLog(@"Called when press");
// sender.hidden = YES;
dlIndex = sender.tag/10;
bIspress=true;
NSLog(@"INDEX : %d : %d",dlIndex,[sender tag]);
// Categorycell *cell = (Categorycell *)[self.tbl_view dequeueReusableCellWithIdentifier:@"Categorycell"];
// cell.cell_Progress.hidden=NO;
// [cell.cell_Progress setProgress:0.];
NSString *str_id=[arr_comic_id objectAtIndex:dlIndex];
[[NSUserDefaults standardUserDefaults] setValue:str_id forKey:@"book_id"];
// dlIndex = [sender tag]/10;
dlCell = (Categorycell *)[[sender superview]superview];
NSLog(@"INDEX progress : %d : Cell Tag : %d",dlCell.cell_Progress.tag,dlCell.tag);
NSIndexPath *path = [tbl_view indexPathForCell:dlCell];
if(dlCell.cell_Progress.tag==dlCell.cell_btn.tag)
{
[self Apicall_background];
}
// cell_Progressview = (UIProgressView*)[dlCell.contentView viewWithTag:dlIndex*10+1];
// cell_Progressview.hidden = NO;
}
나는 테이블 셀의 버튼 진행 표시 줄이 – rakesh