Theocacao
Leopard
Design Element
Comment on "A Quick Objective-C 2.0 Tutorial"
by CY — Jul 31
Hi There,

I am new to Obj - C, I don't understand
this line

yearAsObject = [NSNumber numberWithInteger:self.yearReleased]; return [NSString stringWithFormat:@"%@ by %@. Released in %@.", self.title, self.studio, yearAsObject];

can we just use self.yearReleased to return the int ?

return [NSString stringWithFormat:@"%@ by %@. Released in %@.", self.title, self.studio, self.yearReleased];


thanks in advance
Back to "A Quick Objective-C 2.0 Tutorial"
Design Element

Copyright © Scott Stevenson 2004-2015