Swift: Text label not updating
<p>I have a text label (NSTextField). I want it to pin to the upper left vertex of every object to show an element's number in UI. 
But my label shows only ZERO and doesn't move (it stays in the upper left corner). What I did wrong?</p>

<p>Here is my code in AppDelegate.swift:</p>

<pre><code>import Cocoa

@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {


@IBOutlet weak var window: NSWindow!
@IBOutlet weak var drawingView: DrawingView!
@IBOutlet weak var label: NSTextField!


var localArray: [CGPoint] = []

func applicationDidFinishLaunching(aNotification: NSNotification) {

    label.textColor = NSColor(calibratedRed: 0.15, green: 0, blue: 0.75, alpha: 0.3)
    label.font! = NSFont(name: "Arial Bold", size: 60)!
    label.backgroundColor = NSColor.clearColor()
    label.stringValue = "\(localArray.count/4)"

    for (pointIndex, _) in localArray.enumerate() {

        let point = CGPoint(x: (localArray[(pointIndex/4)+1].x), y: (localArray[(pointIndex/4)+1].y))

        label.sizeToFit()
        label.frame = CGRect(origin: point, size: CGSize(width: label.bounds.width, height: label.bounds.height))
    }
}
</code></pre>

<p>And here is my code in DrawingView.swift:</p>

<pre><code>   var delegate = NSApplication.sharedApplication().delegate as! AppDelegate
   delegate.localArray = myArray.map { return $0.coordSequence()[0] }
</code></pre>

<p>myArray contains cgpoints.</p>

<p>Am I right putting label parameters inside <strong>applicationDidFinishLaunching</strong> method?</p>