*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
if ([active_text_field canResignFirstResponder])
[active_text_field resignFirstResponder];
NSString *pref_key = [pref_keys objectAtIndex: [sender tag]];
if ([active_text_field canResignFirstResponder])
[active_text_field resignFirstResponder];
NSString *pref_key = [pref_keys objectAtIndex: [sender tag]];
- [(UISlider *) control setValue: dval];
+ // Hacky API. See comment in InvertedSlider.m.
+ if ([control isKindOfClass:[InvertedSlider class]])
+ [(InvertedSlider *) control setTransformedValue: dval];
+ else
+ [(UISlider *) control setValue: dval];
} else if ([control isKindOfClass:[UISwitch class]]) {
sel = @selector(switchAction:);
[(UISwitch *) control setOn: ((int) dval != 0)];
} else if ([control isKindOfClass:[UISwitch class]]) {
sel = @selector(switchAction:);
[(UISwitch *) control setOn: ((int) dval != 0)];