I have UIImageView what have a role of a background image in View. I want to load two different images in this UIImageView, depending on what state is selected in toggle switch in Settings Bundle.
What the best way to do it?
Try something like this:
NSUserDefaults* settings = [NSUserDefaults standardUserDefaults];
NSString* imgName = [settings boolForKey:@"toggle_switch"] ? @"switch_on.png" : @"switch_off.png";
UIImage* img = [UIImage imageNamed:imgName];
[imageView setImage:img];