objective c - PNG image sequence animating error -


i want make animation 385 png images, i've written code , can see below. xcode whole time giving "thread 1: signal sigabrt" error...

i have big list of png images (the frames) counting "picollage 01" "picollage 385"

my code:

#define image_count  385   nsmutablearray *imagearray = [[nsmutablearray alloc] initwithcapacity:0];      (int = 1; <= image_count; i++)              if (i < 100) {                 [imagearray addobject:[uiimage imagenamed:[nsstring stringwithformat:@"picollage 0%d.png", i]]]; }             else {                 [imagearray addobject:[uiimage imagenamed:[nsstring stringwithformat:@"picollage %d.png", i]]];}      animatview.animationimages = [imagearray copy];     animatview.animationrepeatcount = 1000;   [animatview startanimating]; 

maybe cause of issue [[nsmutablearray alloc] initwithcapacity:0], should [[nsmutablearray alloc] initwithcapacity:image_count]


Comments

Popular posts from this blog

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

Android Gson.fromJson error -