Erase a subview
If I want to erase a subview, is it done w开发者_JAVA技巧hen I put mysubview.alpha = 0;? Or do I have to do anything else? Thank you!
If you just want to remove it do so using
[mySubview removeFromSuperview];
To "erase" a subview, just release it ;) It you put it's alpha value to 0, it is only hidden.
As said in comment, you also have to remove it from superview ([myView removeFromSuperview]
).
simply use:-
[*yoursubviewname* removeFromSuperView];
精彩评论