Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 12-01-2009, 08:58 PM   #17 (permalink)
V42
Registered Member
 
Join Date: Dec 2009
Posts: 2
Default Allow scroll only when necessary

Quote:
Originally Posted by krye View Post
FYI: People are getting rejected for this

From Apple email:
"The non-public API that is included in your applications is setAllowsRubberBanding"
I just got a rejection email for this reason. In case it helps anyone else, I figured out a solution that works for my needs. This solution is based on the javascript approach described earlier in this thread by MrMidi. The difference is that it disables scrolling/rubberbanding only when the content can fit entirely within the web view. If the content is larger than will fit, scrolling & rubberbanding are allowed.

Code:
<html>
  <head>
    <script>
      document.ontouchmove = function(event) {
        if (document.body.scrollHeight == document.body.clientHeight) event.preventDefault();
      }
    </script>
  </head>
  <body>
    <p>No scrolling for you!</p>
  </body>
</html>
V42 is offline   Reply With Quote
 

» Advertisements
» Online Users: 293
23 members and 270 guests
ADY, apatsufas, dacapo, dcool, HemiMG, ilmman, iosdevjtp, jakerocheleau, leahov, macanacas, MarkC, marto1914, masc2279, morands, PsychoChris, sly24, smithdale87, sneaky, Sunny46, thh022, Thrillhouse1919, timle8n1, vogueestylee
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,877
Threads: 89,222
Posts: 380,720
Top Poster: BrianSlick (7,129)
Welcome to our newest member, peterkessler45
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:08 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.