如何在for
循环内调用Web服务?我有两个Web服务。首先,我调用一个Web服务并返回一些数据(名称,用户ID等)。我使用这个用户标识来调用下一个服务。我想在一个卷轴中显示所有骆驼数据(例如,两头骆驼都有这么多照片和视频),并且我想列出新卷轴视图内的所有图像和视频。如何在forloop中调用web服务?
我的代码我向您展示如下:
-(void)listiingNewCamels
{
int numberOfCamels = [msgArray count];
for (int i = 0; i < numberOfCamels; i++)
{
camObject=(IZCamelObject *)[msgArray objectAtIndex:i];
CGFloat yOrigin = i * 395;
UIView*mySampleview = [[UIView alloc] initWithFrame:CGRectMake(34,yOrigin+20,702,365)];
mySamplev.backgroundColor=[UIColor redColor];
camelIDStr=camObject.CamelID;
UIScrollView *myCamelImagesScroll=[[UIScrollView alloc]initWithFrame:CGRectMake(34,30,640,180)];
myCamelImagesScroll.backgroundColor=[UIColor greenColor];
[mySampleview addSubview:myCamelImagesScroll];
[_camelListingScrol mySampleview];
}
_camelListingScrol.contentSize = CGSizeMake(395, numberOfCamels * 400);
}