Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Swift - collecting user input and storing in a plist

I am trying to figure out how to collect user inputs (from a button/text field through an ibaction) and storing the data into a plist's values. is there a relevant video to this issue?

Tough to find the answer through google because most solutions are outdated and use objective-c. Thanks!

a little more information: I have already created a supporting plist, and connected the relevant text fields/ buttons to my view controllers. I understand how to create an ibaction, I am just struggling with the viewdidload commands and how to store the relevant data.

1 Answer

Hi Connor,

The article below is a little long, but it explains the steps of reading and writing data to-and-from a plist file.

http://rebeloper.com/read-write-plist-file-swift/

Hope that helps.

Thanks Chris this is just what I needed :)

No worries, let me know if you have any trouble with this or anything else.