Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Saving stepper value, picker view and date to single plist.

Hi,


I am very new to creating applications and haven't fully figured out how to use the plist function within XCode.


My problem is that I have 3 different input methods to which the user will select values from, those being a stepper, a picker view and a date that logs the current date, which I would like to save to a plist so that the user can view those entries in a table view controller within another view controller.


I haven't really used a plist before therefore my question may sound very silly but regardless I need some help with this.


My current position with development:

The input page is setup but with no save button functionality.


Any help will be greatly appreciated,

regards

Sam.

iMac, OS X Yosemite (10.10.1)

Posted on May 27, 2015 7:10 AM

Reply
1 reply

May 27, 2015 11:59 AM in response to Worfell

Use NSDictionary to store a collection of named values that can have different types.

A NSArray may also be useful in some cases.

Its possible to nest dictionaries and arrays so you could have a NSDictionary that contains a NSArray as one of its entries.


Also look into NSUserDefaults if you are storing app settings especially ones shown in the Preferences window of the app.


On a closer reading it appears that you may simply want to share data between different objects in your running app. In that case I would recommend that you simply use some kind of "cordinator" object, that is passed to both objects that need to communicate e.g. at their creation time, that can then be used to pass messages back and forth.

Saving stepper value, picker view and date to single plist.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.