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 trialPasan Premaratne
Treehouse TeacherOpen source full app for iOS students
Hey iOS Students,
Artsy, a company that deals in art collection and education just open sourced their entire iOS app. This is an excellent opportunity to take a look at how a complex app is built and learn from code written by industry professionals.
Artsy has an excellent iOS team, of which one of our guest teachers, Ash Furrow, is a part of. Play around with the app when you get the chance. It's pretty awesome :)
If you have any questions, feel free to tag/email me.
6 Answers
Rashii Henry
16,433 PointsI think this is excellent. I'll spend the next few days looking through the contents. I found a few lines from skimming through and found myself uncomfortable with the syntax of a few lines..
- (void)setDelegate:(id<ARArtworkDetailViewDelegate>)delegate
{
_delegate = delegate;
@weakify(self);
[self.artwork onArtworkUpdate:^{
@strongify(self);
[self updateWithArtwork:self.artwork];
} failure:nil];
[self updateWithArtwork:self.artwork];
[self.artwork onSaleArtworkUpdate:^(SaleArtwork *saleArtwork) {
@strongify(self);
[self updateWithSaleArtwork:saleArtwork];
} failure: nil];
}
Could you explain the syntax '@strongly(self)' & '@weakify(self)'? Also the method name as well.
Justin Horner
Treehouse Guest TeacherThis is awesome. Thanks for sharing!
Holger Liesegang
50,595 PointsThanks for sharing, Pasan!
agreatdaytocode
24,757 PointsThis is awesome!
Donald Test
3,339 PointsAwesome, I'm downloading it now to examine! Thanks for sharing!
Pedro Ruíz
28,105 PointsThanks for sharing Pasan
Chris Shaw
26,676 PointsChris Shaw
26,676 PointsHi Rashii Henry,
The following article should help explain what both do.
http://aceontech.com/objc/ios/2014/01/10/weakify-a-more-elegant-solution-to-weakself.html
Rashii Henry
16,433 PointsRashii Henry
16,433 PointsThanks Chris Upjohn