Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(void)switchChanged:(id)sender {
- UISwitch *senderSwitch = (UISwitch *)sender;
- NSUserDefaults *uD = [NSUserDefaults standardUserDefaults];
- if (senderSwitch.on == 1) {
- [uD setObject:@"ON" forKey:[cell.cellSwitch.([(BMSettings *)[tableCellArray objectAtIndex:[cell.cellSwitch.tag]] UDKey])]];
- NSLog(@"Switch 1 ON");
- }
- else if (senderSwitch.on == 0) {
- [uD setObject:@"OFF" forKey:[cell.cellSwitch.([(BMSettings *)[tableCellArray objectAtIndex:[cell.cellSwitch.tag]] UDKey])]];
- NSLog(@"Switch 1 OFF");
- }
- [uD synchronize];
- }
Advertisement
Add Comment
Please, Sign In to add comment