Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

nomar383

macrumors 65816
Original poster
Jan 29, 2008
1,310
0
Rexburg, ID
Okay, so I am writing an iPhone app that is basically one view (a UIWebView) that pulls down a bunch of text from my website. I have properly formatted the text on the server-side with CSS/HTML. However, I want to disable both horizontal scrolling, as well as the autorotation feature.

When I add more text than the screen can hold, it disables horizontal scrolling for me automatically (only vertical is enabled at that point). When there is not enough text to fill the entire screen, then both horizontal and vertical scrolling are both turned on (that little "bounce" animation).

I would like to disable the horizontal scrolling completely from the client side. Meaning the UITextView. Advice?
 

nomar383

macrumors 65816
Original poster
Jan 29, 2008
1,310
0
Rexburg, ID
How different is that from what I'm using right now? Will it do the job better?

Code:
<script Language="JavaScript">
window.resizeTo(320,480)
</script>
 

nomar383

macrumors 65816
Original poster
Jan 29, 2008
1,310
0
Rexburg, ID
Well I tried it, and it does the same thing as the script I had. The page still "bounces back" when you drag your finger left or right. Any other ideas?
 

jnic

macrumors 6502a
Oct 24, 2008
567
0
Cambridge
No idea, try it out and post back your findings, would be interested if yours is a better way.

Edit: Posted before I saw your last.
 

jnic

macrumors 6502a
Oct 24, 2008
567
0
Cambridge
Well I tried it, and it does the same thing as the script I had. The page still "bounces back" when you drag your finger left or right. Any other ideas?

You could overlay a view and only pass the vertical component of the touch to the web view.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.