Autosizing text in NSTextFieldCell (Swift 3) for MacOS App
<p><strong>My problem:</strong> I am building a MacOS app in Swift 3 and am looking to auto-resize (change font-size) text in a <code>NSTextFieldCell</code>, such that the text is always visible in its container.</p>

<p>I have come across <a href="https://stackoverflow.com/questions/2908704/get-nstextfield-contents-to-scale/2911982#2911982">Get NSTextField contents to scale</a> but am not sure how to apply this to Swift 3 within my app. Does anyone have any advice or an explanation (or even link) on how to achieve my goal?</p>