ios - compile error: redefinition of label openURL
Posted
by
GeekedOut
on Stack Overflow
See other posts from Stack Overflow
or by GeekedOut
Published on 2012-10-07T21:32:45Z
Indexed on
2012/10/07
21:37 UTC
Read the original article
Hit count: 301
I have a method like this:
- (BOOL)webView:(UIWebView *)aWebView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
{
if ([request.URL.scheme isEqualToString:@"aaa"])
{
openURL:[NSURL URLWithString:@"www.firstwebsite.com"];
}
if ([request.URL.scheme isEqualToString:@"abc"])
{
openURL:[NSURL URLWithString:@"http://www.someurl.com"];
}
if ([request.URL.scheme isEqualToString:@"xyz"])
{
openURL:[NSURL URLWithString:@"http://www.anothersite.com"];
}
return YES;
}
and on the second and third uses of openURL I get a compile error: redefinition of label openURL
Any idea why that happens and how to resolve it? Thanks!
© Stack Overflow or respective owner