Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacBook MH

macrumors member
Original poster
Mar 7, 2009
76
0
as the title says...
I know it is easily possible with NSDictionary, but I don't want that...
The question is in the // with green color


Code:
	int arrayRandomizer = arc4random() % 10;
	NSString *path = [[NSBundle mainBundle] pathForResource:PROPERTY_LIST ofType:@"plist"];
	NSDictionary *rootDict = [[NSDictionary alloc] initWithContentsOfFile:path];
	NSArray *yWord = [[rootDict objectForKey:@"Y"] retain];
	[COLOR="SeaGreen"]//according the int arrayRandomizer number chooses a object (word) form the array yWord and makes it a String[/COLOR]
	[rootDict release];

thanks!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.