cocoa - IOS UIButton with animated gif Image -


how add animated gif file default image uibutton. have added gif file button image. not animating.

thanks.

animated gif won't animate in iphone.. should add uiimageview subview uibutton, extract images gif , animate using uiimageview animation

uiimageview* animatedimageview = [[uiimageview alloc] initwithframe:self.view.bounds]; animatedimageview.animationimages = [nsarray arraywithobjects:                                    [uiimage imagenamed:@"image1.gif"],                                [uiimage imagenamed:@"image2.gif"],                                [uiimage imagenamed:@"image3.gif"],                                [uiimage imagenamed:@"image4.gif"], nil]; animatedimageview.animationduration = 1.0f; animatedimageview.animationrepeatcount = 0; [animatedimageview startanimating]; [yourbutton addsubview: animatedimageview]; 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -