Reputation: 2719
How does one hide an NSTextField
in Swift?
In Interface Builder, there is an option to make the view hidden. However, I can't figure out how to control the hidden state programatically.
NSSecureTextField can be hidden simply by setting
secureTextField.controlView?.isHidden = true
How does one do this for a regular NSTextField
?
Upvotes: 2
Views: 1230
Reputation: 47292
The following should work:
textField.isHidden = true
that's really all there is to it.
Upvotes: 3