Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7442165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:08:03+00:00 2026-05-29T11:08:03+00:00

I understand using constants for your names in a NSDictionary to prevent typos (myName

  • 0

I understand using constants for your names in a NSDictionary to prevent typos (myName will auto complete vs @”myName” won’t).

i’m working with a medium size dictionaries right now and a couple of times, i’ve misstyped key names and had to spend some time tracking down where i miss spelled a word.

i’m wondering, do you consider it worth while to set up a constants naming scheme?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T11:08:04+00:00Added an answer on May 29, 2026 at 11:08 am

    Yes, but I’d advise defining proper string constants rather than #defines for your strings because string constants are type-safe and every reference will use the same actual string object, which improves the performance of using isEqualToString: to compare them.

    To define a private string constant you can put this in your .m file:

    static NSString *const MyConstant = @"MyConstant";
    

    To make it public, you can either put this in your .h file instead, or you can split the definition by putting this in your .h:

    extern NSString *const MyConstant;
    

    And this in your .m file:

    NSString *const MyConstant = @"MyConstant";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As I've come to understand using $('.whatever').click() only works for items created initially. Additional
I understand that using the === compares type, so running the following code results
I understand that using the facebook API I need an api key to connect,
I understand that using postgres on osx is a little difficult because it has
I don't understand how using a 'challenge token' would add any sort of prevention:
I was just trying to understand delegates using the following code. public class delegatesEx
Ok, I understand that using strings that have special characters is an encoding issue.
I'm trying to understand a method using the disassembly feature of Reflector. As anyone
I understand the pros of using namespaces within the actual application layers but when
Im using Doctrine and i dont quite understand this code here: $this->hasColumn('id', 'integer', 8,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.