[英]Hide the subview from View in Storyboard in IOS
I have a view controller in which i have used scrollview and under scroll view there are multiple subviews, Now i want one of the subview to hide initially when the page loads and it should be shown on a click of button, I have hide the subview from storyboard and from code also but the subview don't hides,i'm confuse why it is so, my code for hide is this, 我有一个视图控制器,在其中使用了scrollview,在scroll view下有多个子视图,现在我想在页面加载时首先隐藏其中一个子视图,应该在单击按钮时显示它,我已经隐藏了该子视图从情节提要和代码中也可以,但子视图不会隐藏,我很困惑为什么会这样,我隐藏的代码是这样,
if (_fullView.tag==100) {
[_fullView setHidden:YES];
}
Objective C 目标C
For Hiding try this : 对于隐藏尝试:
[_fullView setHidden:YES];
Using tag : 使用标签:
[[_fullView viewWithTag:100] setHidden:YES];
Swift 迅速
For Hiding : 对于隐藏:
_fullView.hidden = true
Using tag : 使用标签:
_fullView.viewWithTag(100)?.hidden = true
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.