I have a HTML list of about 500 items and a "filter" box above it. I started by using jQuery to filter the list when I typed a letter (timing code added later): $('#filter').keyup( function() { var jqStart = (new Date).getTime(); var search = $(this).val().toLowerCase(); var $list = $('ul.ablist > li'); $list.each( function() { if ( $(this).text().toLowerCase().indexOf(search) === -1 ) $(this).hide(); else $(this).show(); } ); console.log('Time: ' + ((new Date).getTime() - jqStart)); } ); However, there was a couple of seconds delay after typing each letter (particularly the first letter). So I thought it may be slightly quicker if I used plain Javascript (I read recently that jQuery's each function is particularly slow). Here's my JS equivalent: document.getElementById('filter').addEventListener( 'keyup', function () { var jsStart = (new Date).getTime()...
Some good samples with the basic functionalities covered
ReplyDeletehttp://halmueller.wordpress.com/2008/10/08/a-very-simple-uiscrollview-demo/
http://developer.apple.com/iphone/library/samplecode/Scrolling/index.html
http://www.vimeo.com/1642150
http://jonathanwatmough.com/2008/12/implementing-tap-to-zoom-in-uiscrollview-on-an-iphone/
http://cocoawithlove.com/2009/01/multiple-virtual-pages-in-uiscrollview.html
Not to mention:
http://stackoverflow.com/search?q=UIScrollView
My article on two advanced UIScrollView techniques (+ sample code): github.com/andreyvit/ScrollingMadness/:
ReplyDeleteEmulating Photo Library-style paging+zooming+scrolling.
Programmatically zooming UIScrollView.
Its my blog it may be useful for the begineers Tutorial for UIScrollview Programmatically
ReplyDeleteHi i found this video tutorial very useful:
ReplyDeletehttp://www.youtube.com/watch?v=Ptm4St6ySEI
Here's a new one:
ReplyDeletehttp://www.raywenderlich.com/10518/how-to-use-uiscrollview-to-scroll-and-zoom-content#more-10518