I have been using Grinich's method of using the userinfo category for passing on objects, in which case I'm passing an array of FeedItem class objects. However, modelItems as well as feedItems return a null even when myPassedObject is able to print开发者_运维技巧 my items when i NSLog it.
id myPassedObject = [query objectForKey:@"__userInfo__"];
NSArray *modelItems = myPassedObject;
for (FeedItem *feedItem in modelItems) {
[feedItems addObject:feedItem];
}
Try casting myPassedObject
to an NSArray when you assign it to modelItems
. Doesn't seem to be anything else wrong.
I would print out or inspect the query dictionary to ensure that you are passing myPassedObject in correctly.
精彩评论