UI_UIStepper control, uistepper

Source: Internet
Author: User

UI_UIStepper control, uistepper

# Pragma mark-create control UIStepper-(void) createSteppper {UIStepper * stepper = [[UIStepper alloc] initWithFrame: CGRectMake (130,150, 50, 20)]; // set the minimum stepper value, the default value is 0 stepper. minimumValue = 20; // sets the maximum value of stepper. The default value is 100 stepper. maximumValue = 120; // you can specify the number of stepper added or subtracted each time. stepValue = 10; // set the default value of the current stepper step. value = 50; [self addSubview: stepper]; [stepper release]; // bind the click event [stepper addTarget: self action: @ selector (stepperAction :) forControlEvents: UIControlEventValueChanged];} -(void) stepperAction :( UIStepper *) sender {NSLog (@ "stepper"); self. view. frame = CGRectMake (self. view. frame. origin. x, self. view. frame. origin. y, self. view. frame. size. width, sender. value); // self. view. frame = CGRectMake (50,150, self. frame. size. width, sender. value );}

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.