static NSString usage vs. inline NSString constants

It’s good practice to turn literals into constants because:

  1. It helps avoid typos, like you said
  2. If you want to change the constant, you only have to change it in one place

I prefer using static const NSString* static NSString* const because it’s slightly safer than #define. I tend to avoid the preprocessor unless I really need it.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)