As title says, I'm using webview to display a site and I need to show the link in a status bar when the mouse is over an hypertext... How can I do this? I'm sure it is something very easy but till now I could not find anything about this... Thanks for any help, Massy
I got it! I was sooo sure it was sooo easy... Here's what I did for anyone who will have my same problem:
-(void)webView:(WebView *)sender mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(unsigned int)modifierFlags
{
NSArray* keys = [elementInformation objectForKey:WebElementLinkURLKey];
//here I pass the link to a label
if (keys != nil) [statusBarLabel setStringValue:[NSString stringWithFormat:@"%@",keys]];
else [statusBarLabel setStringValue:@""];
// NSLog(@"%@",keys);
}
Also don't forget to UIDelegate your webView. Peace, Massy
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With