我想做以下事情:如果国家==“Россия”,一些行动..但我的if-else语句不起作用。我该怎么办?提前致谢。我的代码:
NSLocale *locale = [NSLocale currentLocale];
NSString *countryCode = [locale objectForKey:NSLocaleCountryCode];
NSString *country = [locale displayNameForKey:NSLocaleCountryCode value: countryCode];
NSLog(@"%@", country);
if (country == @"Россия") {
NSLog(@"GO RUSSIA");
}
else {
NSLog(@"You are not russian");
}