title: Set BOOL property from another class
body: <p>May I know how do I share a BOOL variable from one class to another class?</p>
  
  <p>Here's what I am trying to do. I am setting the BOOL variable of FirstVC at SecondVC. What am I doing wrong here as the app crashes when I tried to change the BOOL value. With no error log.</p>
  
  <p>FirstVC.h</p>
  
  <pre><code>@interface FirstVC : UIViewController &lt;UITextFieldDelegate&gt;{
      BOOL pickUpAddressIsSet;
  
  }
  
  @property (nonatomic) BOOL pickUpAddressIsSet;
  @end
  </code></pre>
  
  <p>FirstVC.m</p>
  
  <pre><code>@synthesize pickUpAddressIsSet;
  </code></pre>
  
  <p>secondVC.m</p>
  
  <pre><code>NSArray *viewControllers = [self.navigationController viewControllers];
  FirstVC *firstVC = (FirstVC *)[viewControllers objectAtIndex:viewControllers.count - 2];
  firstVC.pickUpAddressIsSet = YES; // tried TRUE &amp; 1
  </code></pre>