views:

51

answers:

3

How can I define common parameters in iPhone to use everywhere in different classes.

+1  A: 

Hi,

See this Link

I hope it will help you.

Pugal Devan
A: 

You can also add common definitions class file (e.g. AppConstansts.h), fill it with defines (e.g. #define CELL_HEIGHT 44.0) and add an import line (#import "AppConstansts.h") in <Your project name>_Prefix.pch file that is usually located under "Other Sources" group in the project.

After doing it CELL_HEIGHT will be accessible from all your source files...

Michael Kessler
A: 

Write and retrieve your parameters from a .plist file:

NSString *filePath = @"Parameters.plist";
NSMutableDictionary* plistDict = [[NSMutableDictionary alloc] initWithContentsOfFile:filePath];

NSString *value = [plistDict objectForKey:@"parameterName"];
luvieere