Skip to content

Swift, Singleton, NSCoding, NSData and NSUserDefaults (Example)

Notifications You must be signed in to change notification settings

cocojoe/GameManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GameManager

Swift, Singleton, NSCoding, NSData and NSUserDefaults (Example)

Outline

  • Touch will increase the high score.
  • (Save Data) Send the app to the background.
  • (Restore Data) Kill app and relaunch.
  • A new character object will be added to the characters array each time the app is launched.

Changelog

July 28, 2016

Added custom class and implemented NSCoding prototcol. Converting an array of the custom class to NSData to allow for storage/retrieval in NSUserDefaults. Implemented CustomStringConvertible in singleton for easier debug.

Notes

Utilises the awesome SwiftyUserDefaults for a Swifty experience.

About

Swift, Singleton, NSCoding, NSData and NSUserDefaults (Example)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published