我是新來的客觀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