I have an app that has a label in an xib, which contains text. I would like to assign the text to an NSString for use in other areas of the View. My attempt to accomplish this is:
- In the xib, select the label, show the Identity Inspector, and under Document, fill in the Label field with the desired label name - example: mylabelname
In the .m file, of the same name as the xib, inside a method, assign the value of the label to the variable, example: mytextfield
NSString *mytextfield =[mylabelname.text];
I get an error on the above - Use of undeclared identified 'mylabelname'.
From my research, I think I want to do something like this in my label:
[label mytextfield: mylabelname.text];
Or something similar, but I am not sure how, or where. Can anyone provide me some pointers or guidance on this? I bet this is simple, but I have not been able to figure it out.
Thanks! Rob