ios - What is the best way to store slide-out sidebar menu data -


I have a sidebar menu in my application (like Facebook) and currently I link to my sidebar categories Hard-coded. My question is: What is the best place to store that menu's data?

  1. Did I really do such a hardcode?

  2. SQLite database?

  3. Plist file?

I am asking because I want to keep it in memory which I am in the menu, and I wonder if the database will not be a better way to do this?

Thanax Advance

If you only mean categories of menus, then Hardcoding is fine, depending on how likely they want to change. But if it's like Facebook and they do not change, then it's okay.

In relation to the content displayed on taping a menu item, this is different. There I used to recommend either a SQLite database or better use it to manage it for you.

If you have a view controller that manages the status of that menu, then you can place that menu item there, choose a list of items to display, etc. and that's fine, There really is no need for a database though I suggest that something is flexible so that you can easily add new items.

For example, an app that I used to work on, when I came to give a n title, image and selector to list this, I simply prevented me through the list, the title And with the icon created a new item, and when the user called the selector this way, if we needed new menu items, then I could just add a new item to the array and it was like that.

I had this array coded hard in Controllers Initiator, but if you want the serial to be in a plist file, but this is just a preference


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -