title: Variable Not Accessible from within function objective-c
body: <p>I have created an outlet for a textview and I'm trying to use it in a function, outside of the function it works fine, inside its not declared. When I pass it along with the function like StartFunction(textBox) it works fine, but this function also has to work with a bunch of other things like this and I don't like the idea of just passing everything with the function.</p>
  
  <p>What would be a better alternative?</p>
  
  <pre><code>// Header File
  - (IBAction)startButton_clicked:(id)sender;
  @property (strong, nonatomic) IBOutlet UITextView *textBox;
  
  // Main file
  - (IBAction)startButton_clicked:(id)sender {
      if (currentlyOn == false) StartFunction(headLabel);
          else textBox.text = @"Already Started"; // Works fine here
              }
  
  void StartFunction(UILabel *_headLabel)
  {
      _headLabel.text = @"This works fine because it's passed with the function";
      textBox.text = @"textBox is undeclared here";
  }
  </code></pre>