1 / 8

How to use Slider

How to use Slider. 1 What’s the slider? (1) A slider lets you choose a number in a given range. (2) set the Minimum value to 1,the Maximum value to 100,and the current value to 50. How to use Slider.

Download Presentation

How to use Slider

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. How to use Slider 1 What’s the slider? (1) A slider lets you choose a number in a given range. (2) set the Minimum value to 1,the Maximum value to 100,and the current value to 50.

  2. How to use Slider (3) Continuous checkbox checked-this ensures a continuous flow of events as the slider’s value changes. (4) need an outlet that points to the label so that we can update the label’s value when the slider is used.

  3. How to use Slider 2 Some improtant code { int currentValue=lroundf(sender.value); self.sliderLabel.text=[NSString stringWithFormat:@”%d”,currentValue]; }

  4. How to use Switch 1 What’s the slider? It is samll controls that can have only two states:on and off.

  5. How to use Switch 2 Some improtant code. { BOOL flag=sender.isOn; [self.leftSwitch setOn:flag animated:YES]; [self.rightSwitch setOn:flag animated:YES]; }

  6. How to use Segment 1 What’s the segment? (1) It is to show different things. (2) the first section has an index of 0.

  7. How to use Segment 2 Some improtant code. if (sender.selectedSegmentIndex==0){ self.leftSwitch.hidden=NO; self.rightSwitch.hidden=NO; self.segmentButton.hidden=YES; }

  8. How to use Segment else{ self.leftSwitch.hidden=YES; self.rightSwitch.hidden=YES; self.segmentButton.hidden=NO; }

More Related