我有一個網址,我在NSString的urlone是來自XML。但我運行的應用程序它使過剩的嚴重錯誤如何打開iPhone上的按鈕點擊網址
// urlone contains http://www.forasinvest.com/v2/index.php
NSString*myurl=urlone;
NSURL *url = [NSURL URLWithString:myurl];
[[UIApplication sharedApplication] openURL:url];
假設'urlone'是有效的,應該沒有錯。你確定'urlone'好嗎? – 2012-01-05 06:21:42
它說outscope而跟蹤我已經聲明,在頭類 – 2012-01-05 06:24:09
NSString * myurl = urlone; NSLog(urlone); NSURL * url = [NSURL URLWithString:myurl]; [[UIApplication sharedApplication] openURL:url]; – 2012-01-05 06:26:12