Comparing the values of two nsstrings
- by user1776234
So I have been trying to compare two NSStrings in xcode. However, it is not working. What am I doing wrong?
NSString Prog are characters that are xml parsed from mysql
char *cStr = "YES";
NSString *str3 = [NSString stringWithUTF8String:cStr];
if ([str3 isEqualToString:prog]) {
[switch1 setOn:YES animated:YES];
}
else {
[switch1 setOn:NO animated:YES];
}