Bonjour,
le bouton fonctionne, le lien aussi puisque le programme affiche "tourne ". Mais comment associer l'URL : un problème dans mon code ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
- (IBAction)DoSomething:(id)sender {
    //initialize new mutable data
    NSMutableData *data = [[NSMutableData alloc] init];
    self.receivedData = data;
 
    //initialize url that is going to be fetched.
    NSURL *url = [NSURL URLWithString:@"https://site/L1"];
 
    //initialize a request from url
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
 
    //initialize a connection from request
    NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
    self.connection = connection;
 
    //start the connection
    [connection start];
    NSLog(@"Je tourne ...");
 
 
 
   }