1

I am trying to declare a constant string in a method frequently called and at the start of the method I have used:

static NSString *kAPICall       = @"Mail Messages";

Is the correct way, most efficient to do it?

Thanks

DSDev
  • 41
  • 1
  • 3
  • Do you mean constant or static? – Hamed Rajabi Varamini Nov 26 '11 at 10:57
  • You hit the nail on the head ..... I need a constant value for the life of the method, but not really sure of which / how to use? Basic I know! – DSDev Nov 26 '11 at 12:10
  • Please read these two questions and their answer http://stackoverflow.com/questions/538996/constants-in-objective-c http://stackoverflow.com/questions/25746/whats-the-difference-between-a-string-constant-and-a-string-literal – Abbas Mousavi Nov 26 '11 at 14:00

0 Answers0