i’m working on a app where i have nested tree structure i.e. as below
Main List —> Multiple Child(s) List
——— ———–
SchoolOne —> department1
---> department2
---> depertment3
---> and so on
SchoolTow —> depratment1
---> department2
---> department3
---> department4
---> and so on
the Main list will need to be displayed in UITableview and upon clicking that i would show child links and again most likely in UITableView
also main list will be entered manually with dedicated name and after that it can add child list using master list (similiar to sample master list app from xcode 4.2)
i’m struggling to understand which one will be the better solution property list or Coredata or SQLite, since i’m new to iOS dev i’m confused on overall data structure gelling toghther.
also schoolNew can copy departments from existing Child lists of existing Main list i.e. SchoolOne or two etc…
can some one help with indications and tutorials so i can get better view on nesting this easy way?
For any kind of data storage and modelling work you should look at Core Data.
A property list will work, but you’ll need to load it all into memory and write changes back yourself. Sqlite will work, but you’ll be messing about with table rows and queries.
Core Data lets you store your data and retrieve your data in ways that are supported and well optimised for iOS. You don’t need to think in terms of tables and joins and queries (as you would with sqlite), you can think of objects and relationships between objects. You’ll be using a UITableView showing master-detail views – there is the NSFetchedResultsController class that is designed to support this along with Core Data.