title: What is the secret behind "contentScaleFactor" of UIView when used with CATiledLayer?
body: <p>Greetings,</p>
  
  <p>I'm working on an application inspired by the "ZoomingPDFViewer" example that comes with the iOS SDK. At some point I found the following bit of code:</p>
  
  <pre><code>// to handle the interaction between CATiledLayer and high resolution
  // screens, we need to manually set the tiling view's 
  // contentScaleFactor to 1.0. (If we omitted this, it would be 2.0 
  // on high resolution screens, which would cause the CATiledLayer 
  // to ask us for tiles of the wrong scales.)
  pageContentView.contentScaleFactor = 1.0;
  </code></pre>
  
  <p>I tried to learn more about <code>contentScaleFactor</code> and what it does. After reading everything of Apple's documentation that mentioned it, I searched Google and never found a definite answer to what it actually does.</p>
  
  <p>Here are a few things I'm curious about:</p>
  
  <ol>
  <li><p>It seems that <code>contentScaleFactor</code> has some kind of effect on the graphics context when a UIView's/CALayer's contents are being drawn. This seems to be relevant to high resolution displays (like the Retina Display). What kind of effect does <code>contentScaleFactor</code> really have and on what?</p></li>
  <li><p>When using a <code>UIScrollView</code> and setting it up to zoom, let's say, my <em>contentView</em>; all subviews of <em>contentView</em> are being scaled, too. How does this work? Which properties does <code>UIScrollView</code> modify to make even video players become blurry and scale up?</p></li>
  </ol>
  
  <p>TL;DR: How does UIScrollView's zooming feature work "under the hood"? I want to understand how it works so I can write proper code.</p>
  
  <p>Any hints and explanation is highly appreciated! :)</p>