How to create a UITableViewController that displays some hardcoded data in grouped styled (like iPhone settings). For example I need to show some menu options in a table with group style. Now, I know to work with tables and have done it already. But I'm not sure about how should I deal with data that table view will read for constructing the table. Those rows just present some menu options like "order", "review", "about us" then IMHO I have to create some array with that data and store in NSUserDefaults. Am I right?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Create a plist file of your data. It can include arrays of items for each group. Included the plist in your project and read it in for use by your datasource. That creates a nice decoupling of data from UI.