开发者

show content based on navigation route? UITable

I have a table开发者_JAVA技巧 which I'm using as a menu.

If my user navigates from a table cell titled "basic math" I want to show a text view with text being populated from an NSArray titled the same as the cell title...so basicmath.txt

Can anyone point me in the right direction or tell me if this is at all possible? or am I barking up the wrong tree...?

Sorry if its not explained very well...


My favorite way to handle UITable Data is an NSArray filled with NSDictionary objects. Your dictionary would have a couple of keys, one for the title of the row itself (NSString) and another NSString for the contents of the following page.

[NSDictionary dictionaryWithObjectsAndKeys:@"Basic Math",@"title", @"1 + 1 = 2", @"content",nil]

Additionally you can set the content key of the dictionary with data from files included in your project. I think you'll need to clarify your skill level and what exactly your asking for a better answer :) Your question kind of sounds like you want someone to write the program for you :D

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜