开发者

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];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜