Hi i am trying to pass the value from my UITextfield that is declared and being used in my ViewController over to an NSObject I have created that needs the value in it to perform an operation. I’m just not sure what I have to do, I have tried this
I have declared the UITextField in my ViewControllers header file and created an IBOutlet for it.
Then I have #imported this into my NSObject and tried to call it like this
NSString *tempTextField = regTextField.text;
and its getting a error ‘regTextField not defined’.
If regTextField is defined in your ViewController subclass, then you probably want to set the text field in your NSObject from your view controller. I would import your NSObject into the view controller and then have an NSString property in your NSObject that you can set from the viewController.
Hope this helps.