• 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: Defining and using constants in Objective C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Defining and using constants in Objective C


  • Subject: Re: Defining and using constants in Objective C
  • From: Jens Alfke <email@hidden>
  • Date: Sun, 29 Nov 2009 09:46:45 -0800

On Nov 29, 2009, at 9:30 AM, Tharindu Madushanka wrote:

> When defining constants can I keep all important constants in one file and
> use it all over the application, rather defining same constant in several .m
> files. This might be a basic question, but just could not figure out how to
> do this.

Sure, just put the constant declarations in a .h file and #import it from your .m files.

You should review an introductory book on C … this is a basic C question, not specific to Cocoa.

—Jens_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Defining and using constants in Objective C (From: Tharindu Madushanka <email@hidden>)

  • Prev by Date: Re: Defining and using constants in Objective C
  • Next by Date: Re: Animating color fading
  • Previous by thread: Re: Defining and using constants in Objective C
  • Next by thread: Re: Defining and using constants in Objective C
  • Index(es):
    • Date
    • Thread