Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8195871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:17:15+00:00 2026-06-07T05:17:15+00:00

I am writing a Javascript application and am going to wrap it in a

  • 0

I am writing a Javascript application and am going to wrap it in a native iOS application. I would like to block user interaction on the UIWebView containing the JS app for a second or two following an event.

Normally I would use the self.webView.userinteractionenabled = NO but the event is triggered in Javascript. How can I block the user from interacting with the web view?

Guessing return false on a touch event of some sort? It’s scrolling that I want to block.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:17:17+00:00Added an answer on June 7, 2026 at 5:17 am

    When the event occurs in your Javascript code you can send a message to the native wrapper by using the following method:

    Set up the following UIWebViewDelegate method (don’t forget to set the delegate for the UIWebView):

    - (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType {
       NSURL *url = [request URL];
       if ([[url scheme] isEqualToString:@"block"]) {
          // do the your blocking code here
          return NO;
       }
    
       return YES;
    }
    

    Now when your event happens, call the delegate method from your javascript code:

    window.location.href = "block://";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a JavaScript web application. I would like to allow users to search
I'm writing a XUL application using JavaScript for the coding. I would like to
I am writing a small HTML+JavaScript (so to call) application. User is given two
I'm writing a JavaScript application, and I found a nice library qtip2 . My
I am writing an application in JavaScript (with JQuery). The application has a lot
I'm writing an application that utilizes JavaScript timeouts and intervals to update the page.
I'm busy writing a application that refreshes a IFrame completely using javascript, now my
I'm writing a Javascript function that would manipulate an array written on-the-fly and sent
So I am writing a javascript application, and basically if one number is greater
I'm writing a JavaScript chatting application, but I'm running into a minor problem. Here

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.