Hello i have a uiscrollview and i have one object of uiimageview inside the uiscrollview. I start the app. then i scroll to the right at the scrollview and the scrollview changes but i can not see the next uiimageview object that i add at - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView . before i add the next object i remove the previous...what is wrong?
to remove object i use
UIImageView *l;
for (NSInteger ko=0; ko<[[scroll subviews] count]; ko++){
if ([[[scroll subviews] objectAtIndex:0] isKindOfClass:[UIImageView class]]){
//This code never gets hit
l=[[scroll subviews] objectAtIndex:0];
[l removeFromSuperview];
l=nil;
}
}
then i add the next object
[scroll addSubview:imageView];
I remove the previous object because my app crashes when i add 110 images at the scrollview so i have to manage memory i guess. This is why i remove the previous object.
Anyone help please!