On 21/09/2009, at 00:45, Sean Gilligan wrote:

>
> Sean Gilligan wrote:
>> iUI 0.30 uses CSS3 transitions for sliding panels, although you need
>> to enable it with iui.animOn = true.
>> You can see it in action here:
>> http://iui-js.appspot.com/index.gtpl
> Actually, a better place to see it in action is here:
> http://iui.googlecode.com/svn/tags/REL-0.30/samples/music.html
>
> Alternatively, you can download the iUI 0.30 release:
> http://iui.googlecode.com/files/iui-0.30.tar.gz
>
> The link I previously gave is work in progress for the 0.40 release
> which will have iui.animOn = true by default and is currently in an
> inconsistent state.

Hi,

I've modified my old, hyper-forked copy of iui.js to use transitions  
using the "left" property just to find out that it works fine in the  
desktiop Safaris but not at all on the iPhones. I wrote this little  
code snippet in order to be able to tell at runtime whether "left" is  
"transitionable" or not :

var hayCSSAnimado= (function () {
   var e= document.body.appendChild(document.createElement('div'));
   var es= e.style;

   function callback () {
     hayCSSAnimado= (e.offsetLeft === 10);
     //console.log("Callback: hayCSSAnimado: "+ hayCSSAnimado);
     e.removeEventListener( 'webkitTransitionEnd', callback, false);
   }

   es.position= "absolute";
   es.left= "0px";
   //fuerza posicion OK
   var kk= e.offsetLeft;
   es["-webkit-transition"]= "left 100ms";
   e.addEventListener( 'webkitTransitionEnd', callback, false);
   es.left= "10px";

   setTimeout(function () {
     e.parentNode.removeChild(e);
     //console.log("Timeout: hayCSSAnimado: "+ hayCSSAnimado);
   }, 333 /* plenty of time as the transition should take ~100ms */ );

   return false;
})();

I've seen that your code infers it from the presence of (typeof  
WebKitCSSMatrix == "object"), but that won't tell you about the  
"transitionability" of a certain property in particular.

Where's a doc telling exactly what properties can be animated on the  
iPhone ?

Thanks,
--Jorge

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to