Hello all ,
I seem to be a little stuck on the creating propertly list issue.
I want to create a dictionary which feeds data to my uitableview but I seem to be getting some hard luck.
I want to create a dictionary that resembles this one ( give or take a couple of items less )
ItemFour.jpg (image)
I've looked at this tutorial
Property List Programming Guide: Creating Property Lists Programmatically
and I came up with a small sample of my own
it's obvious that i'm trying to use this data of hierachy for my tableviews..
I'm actually using this example
Drill down table view with a detail view - iPhone SDK Articles
So I was wondering how can I can create my propertylist( dictionary ) programmatically so that I can fill it with my own arrays.
those of you who read it thnx in advance
I seem to be a little stuck on the creating propertly list issue.
I want to create a dictionary which feeds data to my uitableview but I seem to be getting some hard luck.
I want to create a dictionary that resembles this one ( give or take a couple of items less )
ItemFour.jpg (image)
I've looked at this tutorial
Property List Programming Guide: Creating Property Lists Programmatically
and I came up with a small sample of my own
Code:
//keys
NSArray *Childs = [NSArray arrayWithObjects:@"testerbet", nil];
NSArray *Children = [NSArray arrayWithObjects:@"Children", nil];
NSArray *Keys = [NSArray arrayWithObjects:@"Rows", nil];
NSArray *Title = [NSArray arrayWithObjects:@"Title", nil];
//strings
NSString *Titles;
Titles = @"mmm training";
//dictionary
NSDictionary *item1 = [NSDictionary dictionaryWithObject:Childs, Titles forKey:Children , Title];
NSDictionary *item2 = [NSDictionary dictionaryWithObject:Childs, Titles forKey:Children , Title];
NSDictionary *item3 = [NSDictionary dictionaryWithObject:Childs, Titles forKey:Children , Title];
NSArray *Rows = [NSArray arrayWithObjects: item1, item2, item3, nil];
NSDictionary *Root = [NSDictionary dictionaryWithObject:Rows forKey:Keys];
// NSDictionary *tempDict = [[NSDictionary alloc] //initWithContentsOfFile:DataPath];
NSDictionary *tempDict = [[NSDictionary alloc] initWithDictionary: Root];
it's obvious that i'm trying to use this data of hierachy for my tableviews..
I'm actually using this example
Drill down table view with a detail view - iPhone SDK Articles
So I was wondering how can I can create my propertylist( dictionary ) programmatically so that I can fill it with my own arrays.
those of you who read it thnx in advance