title: Access User-Defined Runtime Attributes in ViewController Programmatically iOS 7
body: <p>Currently I have a BOOL in runtime attributes for my view controller that I use to see if my view controller should add a button to the navigation bar programmatically. I was told that to access the attribute in the code, you add a property with the same name like this:</p>
  
  <pre><code>@interface MyViewController
  
  @property (nonatomic, assign) BOOL showButton;
  @end
  
  @implementation
  
  @synthesize showButton = _showButton;
  
  
  -(void)viewDidLoad {
      [super viewDidLoad];
      if (_showButton) {
          //show button
      }
  }
  @end
  </code></pre>
  
  <p>And this does work in iOS 8 and 9, but for some reason in the simulator, iOS 7 does not read the Boolean and it's always set to false.</p>
  
  <p>I feel like this is a serious enough problem that someone should have an answer but Google or the search results on SO didn't seem to have results for this.</p>
  
  <p>I really appreciate the help!</p>
  
  <p>UPDATE: I set the value in the Storyboard.</p>