title: Correct way to create CADisplayLink: UIScreen vs. init()
body: <p>There are 2 ways to get CADisplayLink in iOS. The direct one is to use initializer:</p>
  
  <pre><code>let displaylink = CADisplayLink(target: self,
                                  selector: #selector(step))
  </code></pre>
  
  <blockquote>
    <p>Returns a new display link.  </p>
  </blockquote>
  
  <p>This way is used in Apple's example: <a href="https://developer.apple.com/reference/quartzcore/cadisplaylink#2851437" rel="nofollow noreferrer">Listing 1</a>.</p>
  
  <p>But there are other way to get it from <code>UIScreen</code>:</p>
  
  <pre><code>let displayLink = UIScreen.main.displayLink(withTarget: self, 
                                              selector: #selector(step))
  </code></pre>
  
  <blockquote>
    <p>Returns a display link object for the current screen.<br>
    You use display link objects to synchronize your drawing code to the screen’s refresh rate. The newly constructed display link retains the target.</p>
  </blockquote>
  
  <hr>
  
  <p>Documentation is very poor for details, but the second way looks a little more optimised. May be someone who has experience with <code>CADisplayLink</code> can tell which way to create it is preferred.</p>