开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜