iphone - Should I animate a three dots loading animation using Core Animation or should I find a way to show a gif of the same operation? -


basically have 3 dots supposed bigger , smaller in succession on loading screen , i'm wondering best way simple animation - coding or otherwise?

for simple animation can use uiimageview animation animate set of images (i.e. use images frames in animation).

uiimageview* dotsimageview= [[uiimageview alloc] initwithframe:dotsframe];  // load frames of animation dotsimageview.animationimages = @[[uiimage imagenamed:@"image1.png"],                                   [uiimage imagenamed:@"image2.png"],                                   [uiimage imagenamed:@"image3.png"]];  // set how long take go through images  dotsimageview.animationduration = 1.0; // repeat animation forever dotsimageview.animationrepeatcount = 0; // start animation [dotsimageview startanimating]; // add view [self.view addsubview:dotsimageview]; 

if don't want use preset images dots, can chain uiview animations using completion block. here's tutorial on uiview animations: http://www.raywenderlich.com/5478/uiview-animation-tutorial-practical-recipes


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -