Comment ouvrir l'URL de la string dans Webview pour iPhone

Je veux juste ouvrir une URL à partir de ma string, ma string a déjà une URL Je veux juste montrer dans UIWebView

 mySsortingng=http://maps.google.com/maps?zoom=8&sensor=false&lci=transit&layer=traffic&saddr=1.31224,103.865&daddr=1.310664,103.857132 NSSsortingng *urlSsortingng = [mySsortingng absoluteSsortingng]; NSSsortingng *urlAddress =mySsortingng;// NSURL *url = [NSURL URLWithSsortingng:urlSsortingng ]; NSLog(@" url is %@",url); its null //URL Requst Object NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; NSLog(@" url req is %@",url); //Load the request in the UIWebView. [webe loadRequest:requestObj]; 

Je reçois cette erreur

 se&lci=transit&layer=traffic&saddr=1.31224,103.865&daddr=1.310664,103.857132 2010-08-02 13:20:08.253 Wat2Eat[5332:207] *** -[NSCFSsortingng absoluteSsortingng]: unrecognized selector sent to instance 0x1ac570 2010-08-02 13:20:08.267 Wat2Eat[5332:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFSsortingng absoluteSsortingng]: unrecognized selector sent to instance 0x1ac570' 2010-08-02 13:20:08.283 Wat2Eat[5332:207] Stack: ( 

Ajoutez ceci à votre méthode:

  NSSsortingng *urlAddress = @"http://myurl.com"; //Create a URL object. NSURL *url = [NSURL URLWithSsortingng:urlAddress]; //URL Requst Object NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; //Load the request in the UIWebView. [detailWebView loadRequest:requestObj]; 
 - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. NSURL *websiteUrl = [NSURL URLWithSsortingng:@"http://www.google.com"]; NSURLRequest *urlRequest = [NSURLRequest requestWithURL:websiteUrl]; [myWebView loadRequest:urlRequest]; }