views:

29

answers:

1

Is there anyway that i can define an NSString. Inside of one class then access its value inside of another class?

A: 

As an example...

In global.h

extern NSString *const VERSION;

in global.mm

#import "Global.h"
NSString *const VERSION = @"1.0.1";

any other source file can #import global.h to access the value.

ohho
Hi Hoarace ,is it necessary to include the #import "global.h" in the Application_Prefix.pch also.
raaz
@raaz, not necessary.
ohho