Tuesday, August 14, 2012

Modifying PhoneGap Childbrowser View

In IOS, removing the back/forward, refresh, and history buttons from ChildBrowser requires opening its .xib file.

I removed everything except the done button:


Childbrowser Plugin

http://blog.digitalbackcountry.com/2012/03/installing-the-childbrowser-plugin-for-ios-with-phonegapcordova-1-5/

I thought that was a really good guide for getting started on Phonegap's Childbrowser plugin.

I'm using it to open PDFs from phonegap.

Tuesday, August 7, 2012

My First Stack Overflow Answer

http://stackoverflow.com/questions/11783402/iscroll-and-similar-will-not-scroll-horizontally-phonegap-jqtouch-iphone-app/11852309#11852309

I use Stack Overflow a ton, and I'm going to try to make more of an effort to contribute.

I was having trouble scrolling horizontally with the iscroll plugin, and I solved it by enabling the hScroll option (which I thought should have been enabled by default). I use iscroll's zoom function to enable zooming on a single div, while the rest of the page does not zoom.

SigPad API

I had difficulties getting Thomas J Bradley's HTML5 Signature Pad to let me to use its API without resetting the field. This Github issue explains a workaround:

https://github.com/thomasjbradley/signature-pad/issues/13

He is saving the signature, declaring the api variable, then regenerating the signature.

I needed to use the .getSignatureImage() api function which allows me to turn the signature into a base64 string so I could store the signature in a database.