0
我用一些UIImageViews
和UILabels
创建了自定义UiTableViewCell
。 现在我有问题:当我滚动tableView
我想在visiblePaths中获得cellForYoutube
。如何使用indexPath从UITableView访问自定义的UITableViewCell?
那我怎么想这样做:
- (void)loadImagesForOnscreenRows
{
if (videos.count > 0)
{
NSArray *visiblePaths = [self.tableView indexPathsForVisibleRows];
for (NSIndexPath *indexPath in visiblePaths)
{cellForYoutube *cell = (cellForYoutube *)[(UITableView *)self.view cellForRowAtIndexPath:indexPath];
//There it show me erorr: -[UIView cellForRowAtIndexPath:]: unrecognized selector sent to instance.
if (!cell.thumb.image){
NSLog(@"WAS NOTHING IN IMAGE");
[self startIconDownload:cell withIndexPath:indexPath];}
}
}
}
如何解决这个问题?
((UITableView的*)self.view)cellForRowAtIndexPath – santhu
我有这个包括 –