我使用了这段代码:
- (void)webView:(WebView *)sender didStartProvisionalLoadForFrame:(WebFrame *)frame //2 errors on this line stating: expected ")" before "WebView" and expected ")" before "WebFrame"
{
//Only report feedback from main frame.
if (frame == [sender mainFrame]) {
NSString *url = [[[[frame dataSource] request] URL] absoluteString];
[adressBar setStringValue:url];
}
}
- (void)webView:(WebView *)sender didRecieveTitle:(NSString *)title forFrame:(WebFrame *)frame // Same 2 errors as the first line of code
{
if (frame == [sender mainFrame]){
[[sender window] setTitle:title];
}
}
但它没有设置窗口的标题或文本字段中的完整网址...我错过了什么? 编辑: 我已经连接了所有东西。