Thursday, 12 January 2012

sharing data between views


hi, can ask common (and best) way of sharing data on iphone apps between views?. i'm designing simple game game play takes place on 1 tab bar, stats game may have viewed, edited on settings tab , seen on high score tab. see mean?, same data used in multiple places throughout app?. i've read 'singletons', and/or perhaps should storing data using data persistence technique move between views , refreshing views each time. way done ?
 

data persistence concept can achieved through number of solutions, 1 of singletons. others include nsuserdefaults, saving .plists, coredata, etc. 1 use not simple question, multiple solutions can used achieve same result. but, might want consider looking deeper model part of mvc design pattern, have flexibility of changing implementation of data persistence without having change how controllers interact it.
 


Forums iPhone, iPad, and iPod Touch iOS Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

No comments:

Post a Comment