title: Storing preferences in NSUser Defaults to recall later
body: <p>Been working on some code streamlining and have realised that it would be really helpful if my app had a preferences system.</p>
  
  <p>Now here's how my code works.</p>
  
  <p>A method runs based upon an integer stored in NSUserDefaults</p>
  
  <p>e.g.</p>
  
  <pre><code>if ([[NSUserDefaults standardUserDefaults] integerForKey:@"scifi1"] == 040){
              [self spaceDown];
          }
          else if ([[NSUserDefaults standardUserDefaults] integerForKey:@"scifi1"] == 10040){
              [self ctrldown];
              [self spaceDown];
          }
  </code></pre>
  
  <p>Now what I want to do is when I exit the view (via a specific button) is to dump the value of @"scifi1" into a new preference, say for example - an integer named @"savedscifi1"</p>
  
  <p>Now I know how to save integers into NSUserDefaults, </p>
  
  <pre><code>    NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
      [userDefaults setInteger:VALUEHERE forKey:@"savedscifi1"];
      [userDefaults synchronize];
  </code></pre>
  
  <p>However - I'm not sure how I can substiture in the value of scifi1 instead of (in this case) 'VALUEHERE' - can anyone help with this? I feel it's really simple but I can't help but think I'm being a bit thick...sleep deprived and approaching a deadline! I know I can't just call up @"scifi1"but beyond that....??</p>