Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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! :)