Ios5 programming -- added the use of step per.

Source: Internet
Author: User

In ios5, a new control, stepper, is added, which is very simple to use.

1. Create a single view application and open viewcontroller. XIB.

2. Add a stepper control to the view.

3. For example, set Related Properties

The value of stepper is a float type

4. Set the response function of stepper's value changed practice and implement the following:

-(Ibaction) Steppervaluechanged :(ID) Sender {


Uistepper* ST = (Uistepper*) Sender;


Nslog(@ "% F", St.Value);

}

Other functions are the same as slider.

Uicatalog, an official example provided by Apple, is a very useful example. It basically contains how to use all controls. Many new users learn how to use controls through this example, now this example has been updated and added to the stepper demo. Therefore, this example must be compiled in xcode4.2.

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.