Hi i need help with UIScrollView.. i m loading tens views onto my scroll view.. am loading them correctly.. I m Using IBoutlet for showing scroll view. now the problem is i want my开发者_运维问答 scroll view to reset to nil on disappearing and reappearing of mine view..
I m making its delegate to nil. and releasing mine array in which the images are stored.. To make a scroll view nil that is to delete all the subviews of a scroll view do i have to reinitialize the scroll view.. Sorry for my english.. and please any help or hint will be appreciated.
just remove your scrollview subViews and add subview when you want dont need to reinitialize
NSArray *scrollViewSubViews=[yourScrollView subviews];
for(UIView *view in scrollViewSubViews)
{
[view removeFromSuperview];
}
If you wanna Add a view just
[yourScrollView addSubview:yourimageViews];
精彩评论