tags:

views:

55

answers:

2

Hi,

I need to know which is equivalent concept of Java's property class in Objective-C?

+3  A: 

Have a look at NSUserDefaults for something similar to System.getProperty() or have a look at NSDictionary and NSMutableDictionary.

There is also the Property List Programming Guide.

Gregory Pakosz
hello.. thanks for reply..how to do the same thing without hard coding the values.. i've saves all values in a text file, i want to retrive the values from text file usign NSDictionary or NSMutableDictionary., or through any other procedure in Objective-C..
suse
you either have to parse the text file yourself or you adhere to the plist format and use Apple's property list editor (part of the SDK) to edit plist files
Gregory Pakosz
A: 

This is a concept where we access the data in the form of key. You can look for KVC(key value coding) in cocoa for detailed explanation on this topic.

There is concept called property in Objective C(2.0) which does similar task, this basically add getter and setter method for the data. (http://www.cocoacast.com/?q=node/103)

Girish Kolari