iphone - How to structure data: arrays in array -
i trying come structure data. let's imagine have library. in library, there different books - can add books library , delete them. guess need start nsmututablearray
:
nsmutablearray *entirelibrary;
each book in library has set of features. require array (such different strings headings in each book) , other features, such page length, require integer. set of characteristics stays same each book, so:
nsstring *booktitle; nsmutablearray *chapterheadings; nsinteger *pagecount;
my question best way store of information in library. right now, have different arrays, strings or integers , can't see how can assign them individual book placed in library -- , how access data when need it.
create own custom class called bookclass. keep booktitle, chapterheadings , pagecount properties of class , add bookclass objects entirelibrary nsarray.
Comments
Post a Comment