@Override public void setSelected(boolean selected) { super.setSelected(selected); int state = selected ? Selected : Normal; states.setState(state); updateText(state); updateImage(state); }
@Override public void setFrame(CGRect frame) { super.setFrame(frame); frame.origin.x = 0; frame.origin.y = 0; if (title != null) title.setFrame(frame); if (fore != null) fore.setFrame(frame); }
@Override public void setHighlighted(boolean highlighted) { super.setHighlighted(highlighted); int state = highlighted ? Highlighted : isSelected() ? Selected : Normal; states.setState(state); updateText(state); updateImage(state); }