swift - Advise where to store data for iOS app -
i have created app using ionic , cordova , want remake on ios. working ios first time, , cannot figure out how store data. example: have form user has input data, inputs not in 1 view, there must several views. used create empty array , put step step, can't use same view controller on multiple views. tried core data, core data cannot store arrays. object this:
var samplearray = ( duration: 13, dayoftheweek: thursday, personlist: [ (name: rocky, age: 26), (name: ralph, age:23) ] )
the question be: how make input form on several views , should store data, , later able store data core data?
as first comment says, question quite large. when 'one form on several view', consider 'one form per view'. keep simple s... ;) (except if use page control form.)
basically, have 3 ways store data :
- nsuserdefaults : store data in dictionary later use
- file : save data file (why not .csv ?)
- coredata : can persist arrays binary data in core data
there numerous tutorials on these topics. www.raywenderlich.com site 1 begin...
Comments
Post a Comment