Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/105.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
如何在滚动视图中显示图像列表,从iphone中的URL XML文件检索图像_Iphone_Ios_Ios6 - Fatal编程技术网

如何在滚动视图中显示图像列表,从iphone中的URL XML文件检索图像

如何在滚动视图中显示图像列表,从iphone中的URL XML文件检索图像,iphone,ios,ios6,Iphone,Ios,Ios6,我可以从web服务器的XML文件中检索图像,并将图像列为滚动视图。现在,我想单击一个图像,它会将我带到另一个窗口,该窗口将再次显示一些图像作为集合视图。谁能建议我怎么做 我列出了我的TableView控制器和参考图像,说明我需要如何从现有的 MyTableViewController.m - (void)viewDidLoad{ [super viewDidLoad]; xmlParser = [[egsXMLParser alloc] loadXMLByURL:@"htt

我可以从web服务器的XML文件中检索图像,并将图像列为滚动视图。现在,我想单击一个图像,它会将我带到另一个窗口,该窗口将再次显示一些图像作为集合视图。谁能建议我怎么做

我列出了我的TableView控制器和参考图像,说明我需要如何从现有的

MyTableViewController.m

- (void)viewDidLoad{
     [super viewDidLoad];
     xmlParser = [[egsXMLParser alloc] loadXMLByURL:@"http://retrieveurlxml.com/sample.xml"];
     [self.tableView reloadData];
   }



- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
        static NSString *CellIdentifier = @"myimages";
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
        if (cell == nil) {
            cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
        } UIImage *currentTweet = [[xmlParser tweets] objectAtIndex:indexPath.row];
        UIImageView *tweetImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0,0,cell.frame.size.width , cell.frame.size.height)];
        tweetImageView.image = currentTweet;
        [cell setBackgroundView:tweetImageView];
        return cell;
    }
我当前的滚动视图如下所示

我需要的是如下所示

有谁能建议我如何做到这一点。

只需使用我通过电子邮件发送给您的API即可。要调用此API,请执行以下操作:

ASyncImage *img_EventImag = alloc with frame;
NSURL *url = yourURL;
[img_EventImage loadImageFromURL:url];
[self.view addSubView:img_EventImage]; // In your case you'll add in your TableViewCell.

你能告诉我你的电子邮件地址吗。我会给你一个API,你可以使用它来添加UIImageView,它会为你做一切。@Rushi-ya-sure-Rushi。。这是我的邮件id标记。p1274@gmail.comDid你明白了吗?我已经发电子邮件给你了。是的,我收到了。感谢rushiYou提到将URL直接添加到NSURL。我正在解析XML文件中的图像。这个API是否将自行解析,或者我必须手动解析它并将其发送到AsyncImage(参考请参见上面的问题contains
xmlParser=[[egsXMLParser alloc]loadXMLByURL:@”http://retrieveurlxml.com/sample.xml“];
太好了……再次感谢您的支持。让我试试这个。