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

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -