开发者

Erase a subview

开发者 https://www.devze.com 2023-03-03 00:20 出处:网络
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?

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

精彩评论

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