Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development > iPhone SDK Development - Advanced Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old 07-19-2011, 09:38 PM   #1 (permalink)
Registered Member
 
Join Date: Feb 2010
Posts: 20
lmpeejay is on a distinguished road
Default Javascript slow when running in an UIWebView

Hi there...
I am developing an app for a client of mine, despite the wide array of tools available though objective c, they (the client) has insisted that we use rudimentary web technologies (HTML, Javascript etc) for the program, I believe they are looking to save development costs on ports to other platforms.

I wrote an animation routine in javascript which runs great in Safari on the desktop but very slow in both iphone and ipad (code included below) we were able to resolve a graphic rotation (rotating a large picture clockwise) issue by using css3 animations and key frames in the webkit, but this animation which consists of a series of bitmapped images (png files) was not supported that I could find. Any advice would be greatly appreciated.

Thanks

------

var dieNum;

function dieLaunch(){

// var dieImageSet5 = 19; // total 83

dieNum = 0;
dieTimer = setInterval("dieAnimation(5,19)",40);

}

function dieAnimation(set,end){

var fNameNum;
var fPath;

if(dieNum<=9){
fNameNum = "0000" + dieNum;
}else{
fNameNum = "000" + dieNum;
}

fPath = "url(graphics/dieImages/" + set + "/roll_" + set + "_" + fNameNum + ".png)";

document.getElementById('dieStage').style.backgrou ndImage = fPath;
dieNum++;
if(dieNum > end){
clearInterval(dieTimer);
movePlayer(dieRand);
}
}
lmpeejay is offline   Reply With Quote
Old 07-28-2011, 04:02 PM   #2 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Jan 2010
Location: Issaquah, WA
Age: 42
Posts: 1,244
dljeffery is on a distinguished road
Default

How about using HTML5 animations? (Please excuse my ignorance if that is what you are already doing... although I don't think it's what you're doing, but I'm a complete HTML noob.)

Here are a couple tutorial videos for Hype:

Tumult Hype Tutorials

I have no connection to Hype. Just read about its release a while back, watched the videos, thought it was cool and might prove useful (or just fun) someday, so I bought it on the Mac App Store.

Honestly I've only fired it up a couple times; haven't had time to really play around with it yet. Although I did just spend a few minutes playing with it just now in order to see how easy it was to rotate an image clockwise.
__________________
Recall It! Tag your notes. Tag your photos. Tag your thoughts. Tag your life.

Recall It! for iPad

http://www.dljeffery.com
dljeffery is offline   Reply With Quote
Reply

Bookmarks

Tags
css#, html, javascript, speed, uiwebview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 379
16 members and 363 guests
Absentia, AyClass, Diligent, dre, givensur, hussain1982, jbro, jPuzzle, momolgtm, Newbie123, Paul10, revg, skog, taylor202, tomtom100
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,643
Threads: 94,110
Posts: 402,858
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Diligent
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:45 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0