Hey guys, excuse me for being uneducated, I've just started learning Objective-C.
Basically when I click a button, I want a URL to be opened in a webview element. I have an object set up with an outlet "changeWebSite" and an action "startNow:". changeWebSite is linked up to the webview, and the action linked up to the button. After Interface Builder wrote the .m and .h files, I tested this out:
There's no errors, but nothing happens when I click the button. I tested it out by linking the output to a textbox and use a setStringValue method (which worked), but I just can't get the setURL to work. Any suggestions?
Basically when I click a button, I want a URL to be opened in a webview element. I have an object set up with an outlet "changeWebSite" and an action "startNow:". changeWebSite is linked up to the webview, and the action linked up to the button. After Interface Builder wrote the .m and .h files, I tested this out:
Code:
#import "StartNow.h"
@implementation StartNow
- (IBAction)startNow:(id)sender {
[changeWebSite setURL:(NSURL *)@"http://www.google.com/hi"];
}
@end
There's no errors, but nothing happens when I click the button. I tested it out by linking the output to a textbox and use a setStringValue method (which worked), but I just can't get the setURL to work. Any suggestions?