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
我有這個包括 –