I have a button that I have placed in Interface Builder. The code that is uses is:
Header File
Main File
The button is connected to File's Owner, which is linked to the main file that the above code comes from.
It seems alright, but when I run it in on a device, I get the following:
What have I done wrong?
Header File
Code:
- (IBAction)openBrowser;
Main File
Code:
-(IBAction)openBrowser {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://macrumors.com"]];
}
The button is connected to File's Owner, which is linked to the main file that the above code comes from.
It seems alright, but when I run it in on a device, I get the following:
<Error>: *** -[UIViewController openBrowser]: unrecognized selector sent to instance 0x119f40
What have I done wrong?