Hello all.
I have a paginating scrollview with UIImageView's inside. At a point i need to remove some Imageviews to avoid memory-problems.
But at any point i just get a BAD_ACCESS .
for(UIView *subview in [scrollView subviews]) {
if([subview isKindOfClass:[UIImageView class]]) {
if ( ([subview tag] != ActualPage) && ([subview tag] != (ActualPage - 1)) && ([subview tag] != (ActualPage+1)) )
{
[subview removeFromSuperview];
}
}
}
Basically i wanna remove every subview except the actual page, one back and one forward.