Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Macro for NSLocalizedString

All my calls of NSLocalizedString have nil as second param, because i don't use any comments. But i hate to repeat myself. Now i'm asking myself if it's ok to define a macro like LSSTRING(str) that calls NSLocalizedString(str, nil), and if so how?

like image 294
peko Avatar asked Oct 25 '11 11:10

peko


1 Answers

You can. Add the following macro to your pre-compiled header. ie., in {ProjectName}-Prefix.pch file

#define LSSTRING(str) NSLocalizedString(str, nil)
like image 103
Ilanchezhian Avatar answered Oct 20 '22 00:10

Ilanchezhian