Ciao a tutti,
ho creato una view con due segment,
questo carica una webview,
le web caricate sono dei file pdf che si trovano in un server,
un esempio:
Segment 1 carica “file1.pdf”
Segment 2 carica “file2.pdf”
Volevo sapere se c’é un metodo per poter scaricare i due file contemporaneamente,
cioè ho solo una webview con due indirizzi diversi, vorrei aggiungere un Bar Button per poter scaricare tutte due i file.
Ecco il codice che ho utilizzato per il segmented Control e la web
Grazie di un aiuto.
Codice HTML:
-(IBAction)segmentbutton:(UISegmentedControl*)sender {
NSURL *sourceURL;
switch ([sender selectedSegmentIndex]) {
case 0:
sourceURL = [NSURL URLWithString:@"http://www.sito/doc/1.pdf"];
break;
case 1:
sourceURL = [NSURL URLWithString:@"http://www.sito/doc/2.pdf"];
break;
}
[webview loadRequest:[NSURLRequest requestWithURL:sourceURL]];
}