• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSString constant and how to export them
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >NSString constant and how to export them (From: Romain Brestac <email@hidden>)

  • Prev by Date: Re: Viewing (long) variable as FourCharCode
  • Next by Date: Enabling SSE with Release build Configuration
  • Previous by thread: NSString constant and how to export them
  • Next by thread: Viewing (long) variable as FourCharCode
  • Index(es):
    • Date
    • Thread