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

Reply
 
LinkBack Thread Tools Display Modes
Old 08-05-2010, 07:54 AM   #1 (permalink)
Registered Member
 
Join Date: Apr 2009
Posts: 77
gametest is on a distinguished road
Default [UIImageView startAnimating] Problem

Hello,

I have one problem in UIImageView Animation.

I initialize UIImageView in "initWithFrame" event. Assign array of images. Now i want to start animation when i tap one button.So,
In button tap i wrote [UIImageView startAnimating].

Problem is First time animation not works properly. From the second time it works perfect.

If I wrote [UIImageView startAnimating] when I add imageview to UIView it works. But I don't want to start it in "initWithFrame" event.

This problem comes in iPod iOS 3.0 not in iOS 4.0.

Thanks in advance.
gametest is offline   Reply With Quote
Old 08-05-2010, 09:29 AM   #2 (permalink)
Registered Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
smasher will become famous soon enough
Default

Are you loading the images with imageNamed, or initWithContentsOfFile?

I've noticed that animationImages runs smoother the first time when you use imageNamed; probably because the images are cached.
__________________

Free Games!
smasher is offline   Reply With Quote
Old 08-05-2010, 11:30 PM   #3 (permalink)
Registered Member
 
Join Date: Apr 2009
Posts: 77
gametest is on a distinguished road
Default

Quote:
Originally Posted by smasher View Post
Are you loading the images with imageNamed, or initWithContentsOfFile?

I've noticed that animationImages runs smoother the first time when you use imageNamed; probably because the images are cached.
I used initWithContentsOfFile because it takes less memory than imageNamed.
I will try with imageNamed. Is there any other solution.

thanks for reply.
gametest is offline   Reply With Quote
Old 08-06-2010, 12:41 AM   #4 (permalink)
Registered Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
smasher will become famous soon enough
Default

Quote:
Originally Posted by gametest View Post
I used initWithContentsOfFile because it takes less memory than imageNamed.
I will try with imageNamed. Is there any other solution.

thanks for reply.
I'd heard rumors that playing the animation once off-screen or with visible=NO will make it run smooth the second time.
__________________

Free Games!
smasher is offline   Reply With Quote
Old 08-08-2010, 11:33 PM   #5 (permalink)
Registered Member
 
Join Date: Apr 2009
Posts: 77
gametest is on a distinguished road
Default

Quote:
Originally Posted by smasher View Post
I'd heard rumors that playing the animation once off-screen or with visible=NO will make it run smooth the second time.
yes it is true. but in iOS4.0 this problem is solved.

thanks.
gametest is offline   Reply With Quote
Reply

Bookmarks

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: 321
10 members and 311 guests
alexP, arash5500, gordo26, HemiMG, mediaspree, nobstudio, Objective Zero, Sloshmonster, stanny, Touchmint
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,655
Threads: 94,116
Posts: 402,889
Top Poster: BrianSlick (7,990)
Welcome to our newest member, pungs
Powered by vBadvanced CMPS v3.1.0

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