UIWebView - How to Disable Action Sheets (UIActionSheet)?

前端 未结 5 1757
生来不讨喜
生来不讨喜 2021-02-02 04:01

I would like to know how you can disable UIActionSheets, specifically the Action Sheets being displayed after tapping and holding hyperlinks in a UIWebView. These seem to be ena

5条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-02 04:43

    You can override presentViewController in UINavigationController and do nothing like this.

    @implementation CDVInAppBrowserNavigationController : UINavigationController
    
    - (void)presentViewController:(UIViewController *)viewControllerToPresent animated: (BOOL)flag completion:(void (^ __nullable)(void))completion NS_AVAILABLE_IOS(5_0){
        //Do nothing.
    }
    
    @end
    

提交回复
热议问题