Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

UIStepper is very convenient but I want to change the appearance of it, I need to have customized icon not the plus and minus and also I want to change the color of the control. How can I achieve this? Thanks in advance!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
798 views
Welcome To Ask or Share your Answers For Others

1 Answer

As of iOS 6.0 you can use - (UIImage *)decrementImageForState:(UIControlState)state and - (UIImage *)incrementImageForState:(UIControlState)state to change the labels on the UIStepper control.

This works for iOS 6.0:

[_stepper setDecrementImage:[UIImage imageNamed:@"decrementIcon.png"] forState:UIControlStateNormal];


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...