I understand how to send data to a child View Controller when calling it with a segue. I think I also understand how to send data to a parent View Controller through the use of protocols and delegates. But how do I send data to a grandparent View Controller?
Options that I've considered:
- Send the data to the parent and have the parent send it to the grandparent. But this seems like a lot of extra work when then parent doesn't need to know.
- Use
NSNotificationCenter
. But (1) it is only the grandparent that needs to know, not the whole world, and (2) from the scant Swift documentation that I've found,NSNotificationCenter
seems very unSwiftlike.