What is the generally accepted convention for passing information between views?
After studying different design patterns I'm leaning towards a Model-View-Controller. I am working on an application that uses a tab bar controller, four view controllers, four views, and potentially an object model or data model. I am thinking that some glue code in the four view controllers will connect the info and the display, or maybe simply a message sent between them somehow. I have subclassed UIView, UIViewController, and linked them all together with nibs for each tab.
I have seen one example passing data through the app delegate, but this seemed to be regarded as the improper way to do it. Is there a better example, or a better way?
I can definitely post the source code if you would like, but this question is more general. Essentially:
User inputs data into a view. The data is processed 3 different ways, and output to 3 views that the use can access through the tab bar buttons. When information is updated, the app should update all four views.
I haven't been able to find a clear example in the iphone SDK documentation. If any of you can keep me pointed in the right direction in my study I would greatly appreciate it! BTW This is my first post and I'm very glad to join your community.
Thank you for your time,
-Fred
After studying different design patterns I'm leaning towards a Model-View-Controller. I am working on an application that uses a tab bar controller, four view controllers, four views, and potentially an object model or data model. I am thinking that some glue code in the four view controllers will connect the info and the display, or maybe simply a message sent between them somehow. I have subclassed UIView, UIViewController, and linked them all together with nibs for each tab.
I have seen one example passing data through the app delegate, but this seemed to be regarded as the improper way to do it. Is there a better example, or a better way?
I can definitely post the source code if you would like, but this question is more general. Essentially:
User inputs data into a view. The data is processed 3 different ways, and output to 3 views that the use can access through the tab bar buttons. When information is updated, the app should update all four views.
I haven't been able to find a clear example in the iphone SDK documentation. If any of you can keep me pointed in the right direction in my study I would greatly appreciate it! BTW This is my first post and I'm very glad to join your community.
Thank you for your time,
-Fred