NSLocalizedString random problem
i've a strange problem with following code:
NSString *string = NSLocalizedString("hello",nil);
actived by tapping a button. If i use a simple string all ok, if i use the localized string after 1-2 tap on the button the app crash without any error, i really don't unde开发者_开发问答rstand why, can you help me? Thanks.
It's easy to miss: you should use @"hello", not a "hello". NSString* constant must be defined with preceding @.
This works:
NSString *string = NSLocalizedString(@"hello",@"");
精彩评论