title: Objective-C (iOS) Access UITextField's text from another class
body: <p>this question is extremely basic and I apologize if the answer should be staring me in the face. </p>
  
  <p>So: I have a UITableView and another viewController. I'm updating some information for CoreData in the UITableView's .m file. In order to do this I need the text in a text field in the other viewController. </p>
  
  <p>So being rather inexperienced, I tried:</p>
  
  <p><code>[entity setName:[NSString stringWithFormat:@"%@", viewController.entityNameInputField.text]];</code></p>
  
  <p>I've renamed a few things for clarity. Entity is my entity (no kidding), the attribute I'm setting is called Name, viewController is where the textField is and the text field is called entityNameInputField. </p>
  
  <p>I'm a lot more interested in why this sort of thing doesn't work than what the solution to my problem might be. Why can't I just get the text from the text field in this way?</p>
  
  <p>I suppose to word everything differently:</p>
  
  <p>If I'm in Class A and I want to access the value of say, an NSString in class B, why can't I just use ClassA.TheString or [ClassA TheString] .... from what I've managed to understand, I'm sending these objects getter methods and I can't seem to see why this doesn't work... </p>
  
  <p>Any help would be appreciated :) </p>