Stephen
Stephen

Reputation: 762

Swift CGPoint unusual behaviour

I have a ViewController and the following code.

var point: CGPoint?

override func viewDidLoad() {
    super.viewDidLoad()

    // Initial tile coords
    point = CGPointMake(0, 0)

    // Update UI
    updateUI()
}

func updateUI() {
    println("Update UI")

}

Where I initialise the tile coords, I can see that the x and y values of my CGPoint are correctly set to 0.0. But when I jump into the updateUI() method, the x and y values of my CGPoint have changed! They change to something different each time.

Does anyone know what may be causing this behaviour? Or do you think I should raise a bug report with Apple?

Regards Stephen

Upvotes: 1

Views: 967

Answers (1)

Stephen
Stephen

Reputation: 762

I am having some other issues...But this particular issues appears to be related to the debugger, rather than the actual values. I have filed a bug report with Apple :)

I appreciate all the responses guys

Upvotes: 1

Related Questions