Order of the code in viewDidLoad

Continuing the discussion from Video Tutorial: Swift Scroll View School Part 2: Scrolling:

Hi Greg,

At first this didn’t work for me and it turns out it’s because I put the code that sets up and adds the originLabel subview before the scrollview code (all of this inside viewDidLoad). Once I moved the originLabel code so it was after the scrollview code, it worked.

Why is that?