Javascript touch events in a UIWebview that is embedded in a UIScrollview -


i have question regard javascript , touch events in uiwebview, when uiwebview embedded inside uiscrollview.

the uiscrollview has number of views (i'll call them "subviews" simplicity) side side within it. each subview size of ipad screen , swiping left/right should move on next/previous subview. 1 of these subviews uiwebview in running small javascript app uses touch events , additionally iscroll component in cases.

unfortunately fact uiwebview embedded inside uiscrollview (a practise apple not recommend: http://developer.apple.com/library/ios/#documentation/uikit/reference/uiwebview_class/reference/reference.html - see box labelled 'important') out of hands.

the problem have regard touch events when swiping in uiwebview subview. if load google homepage example swipe works fine , next subview moves view. when load 1 of js apps swipe not work.

i assuming uiwebview component gets touch events , passes them on javascript inside can respond accordingly. propogate them uiscrollview? or javascript code ensure not "stoppropagation" on event? info on how these events co-ordinated appreciated.

lastly, javascript programmer not , objective-c programmer, although understand basics of i.e. have gone thru fair few of stanford itunes ios series of objective-c videos , have coded few demos, that's it.

thanks time.

are failing pages wider uiwebview? if set scalespagetofit property yes , disable bounces on internal uiscrollview uiwebview uses, should solve problem.

you can use following disable bounces:

for (uiview *view in webview.subviews) {     if (![[view class] issubclassofclass:[uiscrollview class]]) continue;     ((uiscrollview *)view).bounces = no;     break; } 

no guarantees app store approval though, i've used apps weren't distributed through app store.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -