title: Xcode preprocessor macro to check if Base SDK >= iOS 7.0
body: <p>Is there any preprocessor macro to compile certain parts of code only if the Base SDK is 7.0 or higher? The "__IPHONE_7_0" defined constant seems to be linked to the iOS development target (and not to the base SDK).</p>
  
  <p>I am using XCode 5 with iOS 7 and iOS 6.1 installed.</p>
  
  <p>The reason why I am asking this is that I am currently transitioning an app from iOS 6 to iOS 7. There are quite a few things to adjust, and I would currently still like to compile my app with the iOS 6.1 as base SDK (and with development target iOS 6.0), but would already like to add some code that I will want for whenever I compile with iOS 7 SDK, but which does not compile if base SDK is iOS 6.1.</p>
  
  <p>Example:</p>
  
  <pre><code>if ([_tableView respondsToSelector:@selector(setSeparatorInset:)]) {
      [_tableView setSeparatorInset:UIEdgeInsetsZero];
  }
  </code></pre>
  
  <p>This above piece of code does not compile with iOS 6.1 base SDK, as it complains about setSeparatorInset not being defined for UITableView. Hence I would like to include this piece of code inside a preprocessor directive, conditionally on the base SDK.</p>