I have two childViewControllers of the same parent, say methodChild
and propertyChild
, and want a method in methodChild
to be called every time a new value is set in one of propertyChild
's properties. What is a good way to do this?
One solution that occurred to me was this:
- In the property setter, find the other child (perhaps through the parentViewController method and childViewControllers array) and ask it to perform the method.
My main worry with this sort of thing is accidentally creating a retain cycle or a memory leak of some sort, so any advice on this would be terrific. Thanks for reading!