1
I have a question in my Uitableview, I put a button on the Cell of a Tableview.
cell.btnDownload.tag = indexPath.row;
[cell.btnDownload addTarget:self action:@selector(btnDownloadClick:) forControlEvents:UIControlEventTouchUpInside];
then to execute I created this method.
-(void) btnDownloadClick:(UIButton *) sender{
// realizar donload aqui //
Faz o donwload aqui
// depois de fazer o download buscar a tag e setar o botão invisivel //
for (UITableViewCell *cell in self.tableView.visibleCells) {
UIButton *button = [cell viewWithTag:sender.tag];
if (ValorTag == 0){
button.hidden = YES;
}
}
// depois de esconder o botão vou setar em um [NSUserDefaults standardUserDefaults]; o ID.
}
in this I am using my tableView gets all white after clicking the button, do not know where I may be missing!!
Want to hide only the button that was clicked after the download.
To understand better is like the App Store that you have a button to download and after finishing it changes image or some.
Thank you guys.
Opa Rafael thanks so much for the help, really I walking and searching for the tag to be hidden is hiding everything, ex, all the components were set with tag = 0. i had only one problem in setting in the Array that the value was not saved, when I closed the App and reopened the value was no longer set, but I used the Nsuserdefaults. and another problem that could have in the future is the reference of Indexpath.Row with the bank ID. Thanks for the help went all right. Great Abs.
– Fabricio Aguiar