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

Christer Nordbø
Christer Nordbø
2,133 Points

Ribbit - Add/Remove Friends

My Friends list is not updated unless i quit the application and relaunch after editing it. Iknow i can run the entire query once more when going back to the FriendsViewController after editing to update the list, but i dont think thats an efficient way of doing anything, specially since i find parse.com to be a really slow service as well. (by looking at my apps performance when running queries).

In the Ribbit Walktrough when going trough the adding / removing friends - It only shows the result on Parse.com, which is correct, but they dont view the results in the application itself. Is this a ignored issue?

I uploaded my code to Github: https://github.com/Cnordbo/TeamTreeHouse-Ribbit - If you look at the FriendsViewController and EditFriendsViewController, the issue is that the "Friends" property in EditFriendsViewController does not point to the "Friends" property in "FriendsViewController" - Could you have a look and see what im doing wrong ?

3 Answers

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

Hi Christer Nordbø,

From looking at your code, it looks like you haven't completed Stage 4 yet. We actually address this issue specifically in this video and solve it by moving that code to the viewWillAppear method. Hope this helps!

Christer Nordbø
Christer Nordbø
2,133 Points

Aha, Thanks! As the chapter regarding adding / removing friends was over, i tought i had done something wrong.

Thanks again :)

Ben Jakuben
Ben Jakuben
Treehouse Teacher

A very fair assumption! I'll have to be more careful when writing to mention things that will be fixed in later videos. :)

Kevin Fricke
Kevin Fricke
3,117 Points

Question about this. I understand how to use the viewWillAppear to make this work but wouldn't it be more efficient to simply use the NSMutableArray that you are already editing in the EditFriendsViewController rather than connecting with the server again to pull down your friends? Is that possible or is there an even better way. Seems inefficient to run the call to the server every time that you want to update the friends list, right?

Ben Jakuben
Ben Jakuben
Treehouse Teacher

Sorry, I missed this reply! Did we talk about this elsewhere? I know I did somewhere, because that's definitely a great idea! There are lots of optimizations we could do with this app. :)

Did you get it to work. Please post code. Karma is watching the webb.