Save and retrieve boolean value in Userdefaults objective C
Solution:
If you save the boolean value in swift and retrieve in objective C then retrieve as String and convert as boolean.
NSString *isOn = [defaults objectForKey:@"isOn"];
if(isOn.boolValue == YES || isOn == nil) {
}
Comments
Post a Comment