如何在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);
}