If you have one NSObject that you want two ViewControllers to be able to use, how do you know which ViewController is calling it so when you pass what ever data you are computing back, you pass it back to the correct ViewController.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want the returned data to change based on the caller, create a method in the object you are retrieving data from rather than directly accessing a property.
In your
NSObject, you could have a method that follows this format (my example is returning a string):Then, from your view controller, you just call the method with the appropriate identifier as input.