Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 06-04-2011, 10:22 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2011
Posts: 50
Maxner is on a distinguished road
Default Saving Data in my App

Hi
I would like to save data inside my app, so that it gets stored in a .plist file. i know how to read from a plist file, but not how to save data. I would like to have a tableView where you see all of the previously saved data and then you click on + and a window pops up, where you write a Name a description and other stuff inside textfields. The Name on other stuff that you write inside the text fields should be saved inside a plist file. I read many tutorials without success and i have no idea how it should work, i am new to xcode!
Maxner is offline   Reply With Quote
Old 06-05-2011, 01:04 AM   #2 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 40
ztory666 is on a distinguished road
Default

userDefault = [NSUserDefaults standardUserDefaults];

//write

[userDefault setObject:@"data" forKey:@"keyfordata"]; // for object
[userDefault setInteger:1 forKey:@"keyfordata"]; // for integer

//read

NSString * data = [userDefault objectForKey:@"keyfordata"]; // for object
int data = [userDefault integerForKey:@"keyfordata"]; // for integer

it's key-value. you have to organize it.

If you need real table database use SQLite
__________________
Available On App Store

ztory666 is offline   Reply With Quote
Reply

Bookmarks

Tags
data, database, plist, save

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 327
5 members and 322 guests
Dnnake, iOS.Lover, jenniead38, pbart, Wikiboo
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,663
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, LezB44
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:18 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0