Change appearance of UIStepper

后端 未结 6 1882
长情又很酷
长情又很酷 2020-12-19 06:50

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 cont

6条回答
  •  余生分开走
    2020-12-19 07:15

    You can always step through the UIViews and guess, too. Anyway, this is my code, which doesn't answer the question directly, but is kind of neat.

    @implementation UIStepper (Util)
    
    - (void) fixForIos7 {
        if (!IS_IOS7)
            return;
        for (UIView *view in self.subviews) {
            view.backgroundColor = [UIColor whiteColor];
            UIButton *button = (UIButton*)view;
            [button setTintColor:[UIColor blackColor]];
        }
    }
    
    @end
    

提交回复
热议问题