Search code examples
ios7custom-controlsuistepper

UiStepper IOS7 Remove Border it's possible?


does anyone know if you can remove the edge of the UIStepper of Ios7? I wish you could see only the decrease and the increase without a border around ... E 'possible to make a custom?

thanks to all


Solution

  • It's not possible to customise the UIStepper. You can only change the background image, the tintColor, and the two images (plus and minus). I think the best and easy way is to create your own like this. 1) Create two buttons and put as text + and - 2) This is the starting code. Then you need to handle the maximum and minimum values:

    .h file
    
     @interface ViewController : UIViewController {
        NSInteger value;
    }
    
    - (IBAction)plus:(id)sender;
    - (IBAction)minus:(id)sender;
    
    
    .m file
    
    
    - (IBAction)plus:(id)sender {
        value++;
    }
    
    - (IBAction)minus:(id)sender {
        --value;
    }