title: How does iOS 7 implement the UI elements so that they look different depending on what SDK you compile with?
body: <p>There are elements like <code>UITableView</code>s, <code>UINavigationBar</code>s that have a different style on iOS 7. </p>
  
  <p>This style is determined at run time, since those classes are implemented on <code>UIKit</code>, and <code>UIKit</code> is linked with your application dynamically at runtime, not statically at compile time. </p>
  
  <p>So one would think that any app run on iOS 7 would have those elements look the way they look on iOS 7. However, they keep the same style they used to have on iOS 6, until you compile with the iOS 7 SDK. Except for some of them (like <code>UIAlertView</code> or <code>UIMenuController</code>)</p>
  
  <p>My only explanation for this is that they do something kind of like this:</p>
  
  <pre><code>#define SDKApplicationWasLinkedAgainst ...
  if (SDKApplicationWasLinkedAgainst &lt; 7.0)
      ...
  else
      ...
  </code></pre>
  
  <p>This is obviously really cumbersome, cause they need to keep maintaining a lot of old code. So I'm curious, is this really what is going on under the hood? What am I missing?</p>