I’m currently relying on the fact that UIApplication is a singleton and I access the models as delegate’s properties, but that seems a long chain to me.
Controller->UIApplication->delegate->Model (->particular property to be set)
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.
Generally speaking, the best way for a view controller to communicate with its model class is to initialize the view controller with the model class. For instance:
There are other approaches for special cases, but this is the best default approach.