Re: NSString constant and how to export them
Re: NSString constant and how to export them
- Subject: Re: NSString constant and how to export them
- From: Steve Checkoway <email@hidden>
- Date: Fri, 1 Sep 2006 12:42:09 -0700
On Sep 1, 2006, at 12:29 PM, Romain Brestac wrote:
Hello list,
I have a framework where I define some NSString constants. When a
class imports my framework's header, I would like this class to be
able to use these constants.
What I did: I declare my constants directly in the header because
they are specific to the class: NSString *const MYCONSTANTSTRING;
Now, I need to set a value for MYCONSTANTSTRING and reuse it both
in the framework class AND in the app that link against this
framework.
So the question is : where do I set the value ?
In the header:
extern NSString *const MYCONSTANTSTRING;
In the .m:
NSString *const MYCONSTANTSTRING = @"foo bar";
--
Steve Checkoway
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden