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
obey me
1,135 PointsPassing data between UIViewcontroller
I am trying to pass data when from a tableview that has a list of author when the row is selected , the new controller that has the tableview should display all the newspaper that are images . but so far only the author name was passed .
1 Answer
Amit Bijlani
Treehouse Guest TeacherWhen you use the method getFirstObjectInBackgroundWithBlock it performs the operation in a background queue, which means that it happens simultaneously while the segue is being performed. That's why you only receive the name of the author. You might want to just pass the name of the author to your destination controller and do the rest of the code inside the viewDidLoad method of your destination view controller. You might want to look at the Build a Self-Destructing Message iPhone app course if you haven't already.
obey me
1,135 Pointsobey me
1,135 PointsAmit Bijlani I look at the Build a self-destructing Message already and there is nothing similar to what i am doing, Please can you help me i tried to complete this part for a month now , how will query the author's newspaper image when it can't use [query wherekey @"whoTook" equalTo:[PFUser currentUser].username];