I tried to open multiple URLs in a row in a single UIWebView but it only open the last URL (last member of the macArray
).
- (IBAction)openURL:(id)sender {
macArray = [NSArray arrayWithObjects:@"XX:XX:XX:XX:XX:XX", @"XX:XX:XX:XX:XX:XX", nil];
NSString *part1URL = @"http://myurl?mac=";
NSString *part2URL = @"&dothis";
for (int i = 0; i < macArray.count; i++) {
NSLog(@"%@", macArray[i]);
NSString *mac = [macArray objectAtIndex:i];
NSString *beginURL = [part1URL stringByAppendingString:mac];
NSString *URL = [beginURL stringByAppendingString:part2URL];
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:URL]];
[webView loadRequest:request];
}
}
Does anyone have any idea? Thank you in advance and have a good day / night.