Created
February 21, 2018 06:19
-
-
Save zenangst/52c852df884fc61726e0d561a8016e6c to your computer and use it in GitHub Desktop.
How to make a label in macOS - Example 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cocoa | |
let label = NSTextField() | |
label.frame = CGRect(origin: .zero, size: CGSize(width: 100, height: 44)) | |
label.stringValue = "My awesome label" | |
label.backgroundColor = .white | |
label.isBezeled = false | |
label.isEditable = false | |
label.sizeToFit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment