【问题标题】:cocoa: in NSWebView, Click on the hyperlink trigger, Is there any waycocoa:在NSWebView中,点击超链接触发,有什么办法
【发布时间】:2012-05-08 00:10:42
【问题描述】:

– webView:shouldStartLoadWithRequest:navigationType:在web视图中点击超链接触发,有什么办法吗?

【问题讨论】:

    标签: objective-c xcode macos cocoa uiwebview


    【解决方案1】:
    //WebView will automatically load the hyperlink u need not to do anything out there except.
    //Inherit <UIWebViewDelegate> in self;
    urwebview.delegate=self;
    In self implement delegate method 
    - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
    {
        //Its call back receved whenever ur webview is navigated By clicking on hyperlink
    }
    

    【讨论】:

    • 我在开发Mac应用程序。
    • NSWebView 和 UIWebView 用法一样吗?
    • 是的,在 Mac Appkit 中它的 NSWebView,在 ios UIKit 中它的 UIWebView
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-02-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多