Implementing a slider control that works with iPhone

Posted on
Thu Nov 03, 2011 6:17 am
roussell offline
User avatar
Posts: 1108
Joined: Aug 18, 2008
Location: Alabama

Re: Implementing a slider control that works with iPhone

iOS5 now supports the HTML5 RANGE tag in mobile Safari allowing for a 'native' slider without using a package like jquery, sencha touch etc. so something as simple as this will work now (in Safari, Safari Mobile and Chrome):
Code: Select all
<input type="range" min="0" max="50" value="0" step="5" onchange="somejavascript" />


With respect to those packages - I've spent a lot of development time with several of them and I have to say that I'm not a fan of the jquery-based packages, IMHO they don't best deliver a native look and feel to the apps developed. I've had the best luck with Sencha Touch, although to package it with Indigo would require a commercial license (it is free for the consumer to use in non-commercial applications however). The Wink toolkit is nice too, but my current favorite is dojo mobile(http://dojotoolkit.org/features/mobile). It has an awesome set of features that closely matches iOS plus integrated graphs/charts and gauges.

It would be great to see something integrated with Indigo out of the box. I've been playing with both Sencha and dojo integration with promising results. The easy thing is to just use REST and an external web server to Indigo, I've actually been playing with modifying indigo's templates and integrating with cherrypy though. The ultimate request would be that Indigo would build the html control page automatically as it does now but using the included toolset, that's a feature request though as I seriously doubt we as users could implement that functionality by hacking or plugins - correct me if I'm wrong please.

EDIT: I forgot to mention that dojo mobile is licensed under the tasty BSD license that permits inclusion in any app for distribution, (http://dojotoolkit.org/license)even commercially so from at least that perspective it's an easy fit with Indigo.

Terry

Who is online

Users browsing this forum: No registered users and 9 guests

cron