Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scrollable div on iPhone without using 2 fingers?

I've got a UIWebView embedded in my iPhone app, and I'd like to keep a locked header and footer DIV on the page at all times, with a scrollable center DIV.

I know that I could do this using a header/footer that are UIView controls, but I want the header and footer to be HTML divs, as a pure HTML/JS/CSS solution will be easier to port to Android/PalmPre/AdobeAir, which is going to be on my todo list relatively soon.

I can do this using techniques like the one mentioned here:

http://defunc.com/blog/?p=94

But this requires that the user use 2 fingers to scroll the div, which is not satisfactory to me...

Any suggestions on how to do this?

Thanks,

Brad

like image 211
Brad Parks Avatar asked Dec 08 '25 12:12

Brad Parks


2 Answers

I found someone that implemented a reusable solution for this, with a header and a footer:

http://cubiq.org/iscroll-4

like image 139
Brad Parks Avatar answered Dec 11 '25 03:12

Brad Parks


I'm not too familiar with the UIWebView, so this may be a totally silly suggestion. But is there anything stopping you from having three UIWebViews on the page? One for the header, one for the body, and one for the footer. Because breaking it up sounds like the right idea.

like image 31
Benjamin Autin Avatar answered Dec 11 '25 03:12

Benjamin Autin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!