Theocacao
Leopard
Design Element
Comment on "A Quick Objective-C 2.0 Tutorial"
by Jonas Witt — Oct 28
stringWithFormat: supports more than just %@ placeholders, so you could save three lines of code and write the summary method as

- (NSString*)summary { return [NSString stringWithFormat:@"%@ by %@. Released in %d.", self.title, self.studio, self.yearReleased]; }
Back to "A Quick Objective-C 2.0 Tutorial"
Design Element

Copyright © Scott Stevenson 2004-2015