storing nsdictionay in nsarray using separator
I want to display an image and some text under that image,, i was thinking of using NSDictionary :
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
@"Tree:shajrah", @"1",
@"Milk:haleeb", @"2",
nil];
NSString *sep = @":";
I want to know a开发者_如何学Gofter this step how can I store it in NSArray using separator?
Thank you, Dalal
This isn't very good design. Instead, you should create a new class that contains the UIImage and the text as properties (and anything else you need), and replace your NSDictionary with NSArray of your class.
精彩评论