Vertically aligning text in an NSTextField using Swift
I have been reading through the various options on how to set the vertical alignment on an NSTextField. I want the text to be displayed in the center and to do it programatically in Swift. Here are the things I have looked so far: http://www.cocoabuilder.com/archive/cocoa/174994-repositioning-an-nstextfieldcell.html https://red-sweater.com/blog/148/what-a-difference-a-cell-makes Vertically Centre Text in NSSecureTextField with subclassing Get NSTextField contents to scale vertically align text in a CATextLayer? One thing I have tried in Swift is to set the following property: textField