-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
Description
A lot of the interface to the IOSKnobControl class has been based on UIButton, particularly things like imageForState: and titleColorForState:. UIButton has in common with this control that it can use a custom image or images, but if you don't supply any, it will supply a default image using text you provide (in the discrete case) or even default text in the case of the IOSKnobControl. And while it honors the tintColor property and tries to choose a consistent set of colors for different states, you can override all these choices using setTitleColor:forState:, setFillColor:forState and the titles property.
UIButton provides further customization options that may or may not make sense for the IOSKnobControl.
- Background image per state: This is something an app developer cannot easily do with the current control. The control could have new methods backgroundImageForState: and setBackgroundImage:forState: like UIButton. But then shouldn't it also have a configurable background color per state as well, in case you're not using custom images? But UIButton doesn't have this. And currently the knob control has no background. It is transparent, and whatever host view you put it in shows through as the background. Adding a background image per state would probably mean yet a third CALayer.
- Title(s) per state: Where UIButton has one title to display, the knob control has many, the number specified by the positions property. It's not clear if the titles on the knob should also be configurable per state, since the positions they mark don't change. If this were required, the control would need something like (NSArray_)titlesForState:(UIControlState)state or (NSString_)titleForPositionIndex:(NSInteger)positionIndex andState:(UIControlState)state and a related setter.
Reactions are currently unavailable