Also, on page 183-4 he has us make new helper methods for the WeatherForecast object, but they were undeclared in the WeatherForecast.h file. We added these lines in WeatherForecast.h before the @end:
-(NSString *)fetchContent:(NSArray *)nodes;
-(void)populateArray:(NSMutableArray *)array fromNodes:(NSArray *)nodes;
We did all the coding in the book (without adding those lines to WeatherForecast.h) and everything worked as it should, except for in the Now section our "Temp:" label gave us something like 0.000000(<WeatherForecast...). Does anyone have any suggestions to help?
ReplyDeleteWhen we did add Tony's lines in WeatherForecast.h, we had the same result as we did without them.
Nevermind, our "Temp:" label problem is fixed. We re-coded the method, must have been a typo.
ReplyDeleteObjective-C seems to allow you to leave methods undeclared in your interface file if you're only using them inside the class -- something like private methods in C++ and Java.
ReplyDelete