Извините, но я не могу придумать, как сформулировать вопрос. Это то, что я пытаюсь сделать. У меня есть XML-файл, который содержит
<Image1>pic1.jpg</Image1>
<Image2>pic2.jpg</Image2>
<Image3>pic3.jpg</Image3>
<ImageCount>3</ImageCount>
Я создаю URL для показа картинки. Когда я нажимаю «Далее» для просмотра следующего изображения, мне нужно создать следующий URL. Я знаю, что это будет примерно так, но сегодня утром я не могу обернуть голову вокруг него.
if (onImageCount <= totalImageCount) {
//here we are on the second image request. we need to create a string to pass the "nextimageurl". this string points to which "Image1,2,3," xml tag to pull up next
nextImageURL = [NSString stringWithFormat:@"http://www.pictureshostedhere.com/%@",selectedVehicle.Image[onImageCount]];
imageData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:nextImageURL]];
carImage = [[UIImageView alloc] initWithFrame:CGRectMake(46,8,228,171)];
carImage.image = [UIImage imageWithData:imageData];
[scrollView addSubview:carImage];
//[self.view sendSubviewToBack:carImage];
[carImage release];
Любая помощь будет отличной!