Tapku library Coverflow problem?
im using tipku library coverflow where they insert different images through this coding, but my problem is that i cannot go with this static method i need to replace it with dynamic one so can use 225 images in it.
covers = [[NSMutableArray alloc] initWithObjects:[UIImage imageNamed:@"0.png"],[UIImage imageNamed:@"3.png"],nil];
i tried this but still nothing happens:
covers=[[NSMutableArray alloc]init];
for (int i = 0; i< 25; i++) {
NSString * imagestring =[NSString stringWithFormat:@"%d.png", i];
NSLog(@"%@ ", imagestring);
[covers addObject : imagestring];
[imagestring releas开发者_StackOverflow社区e];
}
[coverflow setNumberOfCovers:25];
after using that im getting this error
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString size]: unrecognized selector sent to instance 0x577d0f0'
can any one help me so i can implement tapku library in to my coding dynamically. or can correct my code so i can use it. thanks in advance.
Please observe following code...
for (int i = 0; i< 25; i++) {
NSString * imagestring =[NSString stringWithFormat:@"%d.png", i];
NSLog(@"%@ ", imagestring);
[covers addObject : imagestring];
//[imagestring release];
I have commented this line as imageString is already autoreleased,
you dont own it so please do not relese it.
}
What @Toro says is right.
Please use debugger to track where the crash occured. But do make the above change.
Thanks,
精彩评论