i have constant for language.At first time when constant value null i want to set a specific value on this constant i write the given below code but its not working correct :
NSLog(@"Constant value:%@",[Constant getLangCode]);// this print null
if([[Constant getLangCode] isEqualToString:null]) //this if is not working always goes else
{
NSLog(@"null");
[Constant updateLangCode:@"en"];
}
else
{
NSLog(@"null else");
[Constant updateLangCode:@"en"];
}
this gives following output:
constant value:(null)
null else