3
votes

Xcode is now throwing up a warning sign on a previously OK line of code.

[_slider2 setThumbImage:thumbImage2Pressed forState:UIControlEventTouchDown];

Gives the warning:

"Implicit conversion from enumeration type 'enum UIControlEvents' to different enumeration type 'UIControlStat' (aka 'enum UIControlState')

What to do??

1

1 Answers

3
votes

UISlider Method:

- (void)setThumbImage:(UIImage *)image forState:(UIControlState)state;

accept forState an UIConstrolState, not an UIControlEvents.

Maybe you might try this:

[_slider2 setThumbImage:thumbImage2Pressed forState: UIControlStateNormal];

or another UIControlState.