daviewales
daviewales

Reputation: 2719

Hide an NSTextField in swift?

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

Answers (1)

l'L'l
l'L'l

Reputation: 47292

The following should work:

textField.isHidden = true

that's really all there is to it.

Upvotes: 3

Related Questions