title: How to set label text to a variable as the view loads?
body: <p>So I have this little project in which the user goes from one view to another as they click buttons, and the text on the last button they've clicked should show up in a label in the top of the screen. I figured out how to have the variables accessible from anywhere in the app, and also how to change it as the user presses the buttons. Yet, I can only make the label's text change once a button is hit, and I wanted it to happen automatically (the view to appear with the label already containing the correct text).</p>
  
  <p>For that I set the label in two different ways (which I found online):</p>
  
  <pre><code>@interface ViewMateria : UIViewController
  {
      IBOutlet UILabel *materiaLabel;
  }
  @end
  </code></pre>
  
  <p>and </p>
  
  <pre><code>@interface ViewMateria : UIViewController
  
  @property (weak, nonatomic) IBOutput UILabel *materiaLabel;
  
  @end
  </code></pre>
  
  <p>Still, for both of this I can not access the label by a simple <code>materiaLabel.text</code> or anything like that, and can't find a way to do it without the need for the press of a button.</p>
  
  <p>I've been looking for an answer for this for a while now, and nothing that I found seemed to be of use for me (since most of the links I found taught how to change a label text with the press of a button).</p>
  
  <p>This is my first project with Objective-C and Xcode, and I don't really know the answer, so maybe I am missing something quite obvious, but still, if anyone could point me in the right direction, that would be of much help.</p>