Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS

Fabio Floris
Fabio Floris
526 Points

Push Notification and PFRelation

Hello to all boys in my project I have a colelctionView that allows me to create PFRelation with the selected cell. All this happens in a ViewController that for now we will call ViewController1.

Then I have a ViewController2 where I need to be able to automatically remove all of PFRelation 'CurrentUser PFUser perhaps through a query in viewDidLoad or else I do not know ... I can not find the method to do this ...

I tell you all this because I need to send the PushNotification from ViewController2 to all selected users in the ViewController 1 .. I'm probably taking the road more difficult and also wrong but I do not know how to solve this issue ... Someone can 'help me understand what motodo should I use to solve this problem?

P.S. use Parse.com

1 Answer

Oliver Jiang
Oliver Jiang
14,123 Points

I'm not sure if I fully understand the problem, but it sounds like you might benefit from using delegation to get information from one view controller to another. In the iOS Foundations Library, there's some pretty useful information on how to do this in the Delegation video under the Storyboards category.

Hopefully that might help!

Fabio Floris
Fabio Floris
526 Points

Thank you very much! :)