title: viewDidAppear & viewDidLoad Are Are Initializing Positions Too Late
body: <p>I am looking to update a UIView thats in a storyboard (and instantiated from the storyboard) when it loads in the app.</p>
  
  <p>I need to position a few icons in a dynamic way (that the interface builder doesn't let me do quite yet). However, if I put my code in viewDidAppear or viewDidLoad, it seems to be getting called too late.</p>
  
  <p>Here is what happens the first few second or two when the view loads:</p>
  
  <p><img src="https://i.stack.imgur.com/Rm9mx.png" alt="initial load"></p>
  
  <p>And then a bit later it goes to the right position (as the code was called).</p>
  
  <p><img src="https://i.stack.imgur.com/vv8gs.png" alt="Fixed position a second later"></p>
  
  <p>My question is where do I need to initialize the positions of these objects so they dont snap over a second later. viewDidLoad and viewDidAppear are too late? Why!? :)</p>
  
  <pre><code>override func viewDidAppear(animated: Bool)
  {
      initView()
      _gridLines = false
  
  }
  
  func initView()
  {
      _cameraFeed.initAfterLoad()
      //center the buttons on half distance between middle button and screen edge
      var middleDistance:CGFloat = _swapButton.frame.origin.x + _swapButton.frame.width/2
      _linesButton.frame.origin.x = middleDistance/2 - _linesButton.frame.width/2
      _flashButton.frame.origin.x = middleDistance + middleDistance/2 - _flashButton.frame.width/2
      _selectPhotos.frame.origin.x = middleDistance/2 - _selectPhotos.frame.width/2
  }
  </code></pre>
  
  <p>Swift and objc answers welcome!</p>