title: static NSDictionary* const letterValues = @{ ..... } in a method does not compile
body: <p>In <a href="https://github.com/afarber/ios-newbie/tree/master/ScrollContent" rel="noreferrer">a word game for iPhone</a>:</p>
  
  <p><img src="https://i.stack.imgur.com/V0yeR.png" alt="app screenshot"></p>
  
  <p>I'm trying to use the following code in my custom view <a href="https://github.com/afarber/ios-newbie/blob/master/ScrollContent/ScrollContent/Tile.m" rel="noreferrer">Tile.m</a>:</p>
  
  <pre><code>- (void)awakeFromNib
  {
      [super awakeFromNib];
  
      static NSDictionary* const letterValues = @{
                                           @"A": @1,
                                           @"B": @4,
                                           @"C": @4,
                                           // ...
                                           @"X": @8,
                                           @"Y": @3,
                                           @"Z": @10,
                                           };
  
      NSString* randomLetter = [kLetters substringWithRange:[kLetters rangeOfComposedCharacterSequenceAtIndex:arc4random_uniform(kLetters.length)]];
      int letterValue = [letterValues[randomLetter] integerValue];
  
      _smallLetter.text = _bigLetter.text = randomLetter;
      _smallValue.text = _bigValue.text = [NSString stringWithFormat:@"%d", letterValue];
  }
  </code></pre>
  
  <p>Unfortunately this gives me compile error <strong>Initializer element is not a compile-time constant</strong> and I have to remove the <code>static</code> keyword to get my app compile in Xcode (here <a href="https://i.stack.imgur.com/SR1s7.png" rel="noreferrer">fullscreen</a>):</p>
  
  <p><img src="https://i.stack.imgur.com/SR1s7.png" alt="Xcode screenshot"></p>
  
  <p>I think I initialize the <code>NSDictionary</code> correctly - by using the new <a href="http://blog.bignerdranch.com/398-objective-c-literals-part-1/" rel="noreferrer">Objective-C Literals</a> syntax.</p>
  
  <p>But why can't I use <code>static</code> here? </p>
  
  <p>I thought it would be appropriate here to make sure that my <code>letterValues</code> constant is set only once?</p>