我是新来的客观c编程和使用可可应用程序。带有可配置URL的webview
这是我的static URL
基于webview的应用程序。
AppDelegate.h包含
@interface AppDelegate : NSObject <NSApplicationDelegate>
@property (assign) IBOutlet WebView *webview;
@end
而我AppDelegate.m包含
@implementation AppDelegate
@synthesize webview;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
NSString *urlString = @"http://www.google.com";
[[webview mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlString]]];
}
@end
这是工作的罚款这一规定URL
。
我想找出解决方案,使我能够配置URL。 例如保存来自单独窗口的URL,并通过点击保存按钮加载新的指定URL的webview。
由于提前
请添加更多说明,了解如何配置和保存URL。 – Mrunal
现在,当我运行我的应用程序时,它向我显示带有指定URL的webview。好。例如,我在菜单中设置了选项,它可以让我能够更改网址等。 – sajid
此菜单是否存在于您的应用程序级别或网站级别?如果它在应用程序级别,那么Eli建议的是正确的。 – Mrunal