In detail view controller I have formlist. after fill that form I'm storing into array after Save Button click then I'm passing that array into MasterView and Showing Count Of Forms.
-
i'm able to pass the value.But cellForRowAtIndexPath Not Calling. – MANI Jun 24 '15 at 07:21
-
You can use Protocol or NSNotificationCenter – Nitin Gohel Jun 24 '15 at 07:22
-
Just reload your table after passing the values. – Paddy Jun 24 '15 at 07:22
-
Check my asnwer about Notification http://stackoverflow.com/questions/17587877/how-to-reload-the-rootviewcontroller-in-another-viewcontroller-in-ipad/17588047#17588047 – Nitin Gohel Jun 24 '15 at 07:24
-
it's working fine after using NSNotificationCenter. thank you Nitin Gohel. And thaks to every one. – MANI Jul 10 '15 at 06:02
1 Answers
You should take a look on design patterns. In your above case delegation would be preferred. Notification is another option but it should be used for broadcasting a message.
objects receiving notifications can react only after the event has occurred. This is a significant difference from delegation. The delegate is given a chance to reject or modify the operation proposed by the delegating object. Observing objects, on the other hand, cannot directly affect an impending operation
You can read more about on design pattern and viewcontroller interaction:
How do I set up a simple delegate to communicate between two view controllers? http://www.informit.com/articles/article.aspx?p=2091958 http://blog.shinetech.com/2011/06/14/delegation-notification-and-observation/