我在我的應用程序中使用了Webkit WebView,但實際上它不工作。我的意思是頁面加載,但當我點擊頁面上的鏈接沒有任何反應。Webkit WebView不工作
這是我的網頁:http://www.beginninghtml.altervista.org
這是我的代碼:在
我AppDelegate.h
:
@property (assign) IBOutlet WebView *webView;
我AppDelegate.m
:
-(void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
NSURL *url = [[NSURL alloc] initWithString:@"http://www.beginninghtml.altervista.org"];
NSURLRequest *req = [[NSURLRequest alloc] initWithURL:url];
[[_webView mainFrame] loadRequest:req];
}
它正確加載頁面,但是當我點擊頁面上的鏈接時,什麼也沒有發生。 任何人都可以幫助我?
我實際上在這裏找到了解決我的問題的方法: http://stackoverflow.com/questions/4530590/opening-webview-links-in-safari – rambodrahmani 2013-03-25 11:05:22