Ios 如何在CellForRowatineXpath中下载图像?

Ios 如何在CellForRowatineXpath中下载图像?,ios,image,uitableview,Ios,Image,Uitableview,如何使用CellForRowatineXpath方法下载图像 我有如下代码 Cell_ClubOffer *cell = [tableFavouriteDealsAndClubs dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[Cell_ClubOffer alloc] initWithStyle:UITableViewCellStyleDefault reus

如何使用CellForRowatineXpath方法下载图像

我有如下代码

Cell_ClubOffer *cell = [tableFavouriteDealsAndClubs dequeueReusableCellWithIdentifier:CellIdentifier];

    if (cell == nil) {
        cell = [[Cell_ClubOffer alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
    }

        if (indexPath.section < [array_favouriteClubs count]){

            //show clubs here

            ClubDAO *ob = (ClubDAO*)[array_favouriteClubs objectAtIndex:indexPath.section];

            NSLog(@"MY IMAGE URL IS %@", ob.logopath); //is Logo Path

           //Use other ob values on Cell and return it


           return cell;


        }else{

            //show deals here

            int section = (indexPath.section-[array_favouriteClubs count]);

            NSLog(@"SECTION IS %d", (indexPath.section-[array_favouriteClubs count]));

            NSLog(@"COUNT IS OBJECT IS %d", [array_favouriteDeals count]);


            DealsDAO *ob = (DealsDAO*)[array_favouriteDeals objectAtIndex: section];
            NSLog(@"MY IMAGE URL IS %@", ob.logopath); //is Logo Path

           //Use other ob values on Cell and return it

           return cell;

     }
Cell\u ClubOffer*Cell=[TableFavoriteDealandClubs出列可重用cellWithIdentifier:CellIdentifier];
如果(单元格==nil){
cell=[[cell_ClubOffer alloc]initWithStyle:UITableViewCellStyleDefault重用标识符:CellIdentifier];
}
if(indexPath.section<[array\u favoriteClubs count]){
//这里有表演俱乐部
ClubDAO*ob=(ClubDAO*)[array_favoriteClubs objectAtIndex:indexPath.section];
NSLog(@“我的图像URL是%@”,ob.logopath);//是徽标路径
//在单元格上使用其他ob值并返回它
返回单元;
}否则{
//在这里展示交易
int section=(indexPath.section-[array_favoriteCount]);
NSLog(@“节为%d”(indexPath.SECTION-[array_favoriteCount]);
NSLog(@“COUNT IS OBJECT IS%d”,[array_favoriteDeals COUNT]);
DealsDAO*ob=(DealsDAO*)[array_favoriteDeals对象索引:section];
NSLog(@“我的图像URL是%@”,ob.logopath);//是徽标路径
//在单元格上使用其他ob值并返回它
返回单元;
}
现在,我有两个数组

*数组\u收藏夹交易* *数组\u收藏夹俱乐部*

因此,有两个数组包含不同的对象,作为indexOfFirst端点,我只需使用*(indexPath.section-[array\u favoriteCount])*作为下一个索引

如何下载此类场景的图像


谢谢

看到不合适,因为它将如何加载到同一个图像上,我有Customcell.ImageView,每个部分都不同???使用SDWebImage加载和下载图像我有两个数组,这些示例适用于所有单元格来自同一种索引SDWebImage或类似NSData*imageData=[NSData dataFromURL:imageURL]; 把它放在它自己的方法中,然后做[自我]performSelectorinBackground@selector(选择器)];