Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 表视图滚动问题。我只想显示大量图像;但它会减慢表格的滚动速度。它如何才能表现得更好?_Ios_Image_Web Services_Grand Central Dispatch - Fatal编程技术网

Ios 表视图滚动问题。我只想显示大量图像;但它会减慢表格的滚动速度。它如何才能表现得更好?

Ios 表视图滚动问题。我只想显示大量图像;但它会减慢表格的滚动速度。它如何才能表现得更好?,ios,image,web-services,grand-central-dispatch,Ios,Image,Web Services,Grand Central Dispatch,中央大调度 dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ url_Img1=@"http://kiascenehai.pk/assets/uploads/event-images/50x50-thumb/"; url_Img2=userObj.event_dpURL; url_Img_FULL = [url_Img1 stringByAppendin

中央大调度

 dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{

    url_Img1=@"http://kiascenehai.pk/assets/uploads/event-images/50x50-thumb/";

    url_Img2=userObj.event_dpURL;

    url_Img_FULL = [url_Img1 stringByAppendingPathComponent:url_Img2];

    [arr addObject:url_Img_FULL];

    NSUserDefaults * userDefault = [NSUserDefaults standardUserDefaults];

    [userDefault setObject:userObj.event_dpURL forKey:@"dpURL"];

    [userDefault synchronize];

     result = [userDefault objectForKey:@"dpURL"];

     dispatch_async(dispatch_get_main_queue(), ^{

     [tableData addObjectsFromArray:retrievedData];

     [table reloadData];
     });

    });

}

您可以使用AFNetworking库从web快速加载图像


您可以从链接获取此库

您需要在此处添加cellForRowAtIndexPath方法代码,但索引路径处的行不能在此处装箱;它的另一个方法是:-(void)repaint:(NSMutableArray*)retrievedData{}为rowatinex方法显示单元格-(UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(nsindexath*)indexath{User*User=[tableData objectAtIndex:indexath.row];[[cell-imageView]setImage:[UIImage-imageWithData:[NSData DATA WITH CONTENTSOFURL:[NSURL URLWithString:arr[indexPath.row]\\\\\\\\];});返回单元格;}在代码中,哪里被称为您的
dispatch\u async
?使用CONTENTSOFURL:asynchronously调用您的数据,请参阅: