jquery - User Interaction Enabled Javascript -


i writing javascript application , going wrap in native ios application. block user interaction on uiwebview containing js app second or 2 following event.

normally use self.webview.userinteractionenabled = no event triggered in javascript. how can block user interacting web view?

guessing return false on touch event of sort? it's scrolling want block.

thanks!

when event occurs in javascript code can send message native wrapper using following method:

set following uiwebviewdelegate method (don't forget set delegate uiwebview):

- (bool)webview:(uiwebview*)webview shouldstartloadwithrequest:(nsurlrequest*)request navigationtype:(uiwebviewnavigationtype)navigationtype { nsurl *url = [request url]; if ([[url scheme] isequaltostring:@"block"]) { // blocking code here return no; } return yes; } 

now when event happens, call delegate method javascript code:

window.location.href = "block://"; 

Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -