title: Transfer Value from one View to Another
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/6716855/best-way-to-pass-variables-between-views">Best way to pass variables between views</a>  </p>
  </blockquote>
  
  
  
  <p>Is there a way to take info from a IBOutlet TextField and use the information in it in another View? This is what I'm working with so far, but since the settings variable is on a different page, I'm trying to figure out how to make the app retain and transfer the information.</p>
  
  <p>h.</p>
  
  <pre><code>@interface ViewController : UIViewController {
      IBOutlet UITextField *one;
      IBOutlet UITextField *two;
      IBOutlet UILabel *three;
      IBOutlet UILabel *four;
      IBOutlet UITextField *settings;
      IBOutlet UITextField *label1;
      IBOutlet UITextField *label2;
  
  }
  
  -(IBAction)Button;
  
  @end
  </code></pre>
  
  <p>m.</p>
  
  <pre><code>@implementation ViewController
  
  int VarOne = 0;
  int VarTwo = 0;
  int VarThree =0;
  int VarFour =0;
  int VarSettings =0;
  int VarLabel1 =0;
  int VarLabel2 =0;
  
  -(IBAction)Button{
      VarOne = ([one.text intValue]);
      VarTwo = ([two.text intValue]);
  
      VarLabel1 = (VarTwo - (VarTwo * (VarSettings / 100)) - VarOne);
      VarLabel2 = (VarThree / ((100 - VarSettings) / 100 - VarFour));
      three.text = [[NSNumber numberWithInt:VarLabel1] stringValue];
      four.text = [[NSNumber numberWithInt:VarLabel2] stringValue];
  }
  
  @end
  </code></pre>