HI all
I have created an app with a web view & a custom menubar entry. How can I link the two together so that whenever the menubar entry is clicked it loads a pre defined url inside the web view. I have already made an attempt but the code I have used loads the url in my default browser (safari) when the menubar entry is clicked it. All I really need to do is link the menubar to the webkit. Also the webkit is set to preload a url upon the app opening. Here is the code I have used below and your help will be much appreciated...
APPAppDelegate.h
APPAppDelegate.m
I have created an app with a web view & a custom menubar entry. How can I link the two together so that whenever the menubar entry is clicked it loads a pre defined url inside the web view. I have already made an attempt but the code I have used loads the url in my default browser (safari) when the menubar entry is clicked it. All I really need to do is link the menubar to the webkit. Also the webkit is set to preload a url upon the app opening. Here is the code I have used below and your help will be much appreciated...
APPAppDelegate.h
Code:
-(IBAction)openLink:(id)sender;
APPAppDelegate.m
Code:
-(IBAction)openLink:(id)sender
{
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://www.google.com/"]];
}