Um, I may have painted myself into a corner here.
I have a bunch of #define kMyValue @"Some Arbitrary String"
I use these as it makes it handy to use @"kMyValue" as keys for storing a bunch of stuff in the core data db.
So at one stage I end up with a dictionary with strings & keys. the keys are each named after my #define - example
Now I want to print out the *friendly* version of the key - grab the name from the #defined value - how do I do that?? how do I make a variable out of my string?? How do I programatically accomplish the above from an array of dictionary keys?
I have a bunch of #define kMyValue @"Some Arbitrary String"
I use these as it makes it handy to use @"kMyValue" as keys for storing a bunch of stuff in the core data db.
So at one stage I end up with a dictionary with strings & keys. the keys are each named after my #define - example
Code:
#define kName @"Enter full name here"
...
[myDict setObject:@"Dan Tastic" forKey:@"kName"];
...
nameLabel.text = [myDict valueForKey:@"kName"];
descriptionLabel.text = kName;
Now I want to print out the *friendly* version of the key - grab the name from the #defined value - how do I do that?? how do I make a variable out of my string?? How do I programatically accomplish the above from an array of dictionary keys?