0

我正在使用 Macgap:https ://github.com/maccman/macgap/issues/34

在 Notice.m 类中将能够更改 webview 的 URL。我正在尝试以下但收到错误:

[self.contentView.webView setMainFrameURL:[self.url @"https://google.com"]];

建议指出我正确的方向?谢谢

4

1 回答 1

1

setMainFrameURL 需要一个字符串作为参数,[self.url @"https://google.com"] 没有意义,下面会更好:

[self.contentView.webView setMainFrameURL:@"https://google.com"];

另外,Notice 类不是合适的地方,也许是 WindowController,但我不知道你真正想要实现什么。

于 2012-11-04T10:33:20.490 回答