In this tutorial, I will describe the two sliders were used to configure the minimum and maximum parameters of a setting.
In most of the cases, Application may need to select data between some values for that extended features use and develop a new tutorial for picking the min and max value using two handle .
Followings are the steps to implement in our project.
1) Create New Project using (press cmd+shift+n). Select Single View Application.
2) Give the name of the project and select the location where to store.
3) Now Download the source code from here. Following is the Hierarchie of the Downloaded project.
4) Then Open that project and Drag and drop SliderDemo.h and SliderDemo.m file into Our project.
5) Also inserting the images into our Project which shows into below screen.
6) Now, Disable the Arc For Two file for that following screen to apply.
7) Following code implemented into your View controller and put into viewdidLoad method.
UIView *VctrDtl=[[UIView alloc]initWithFrame:CGRectMake(10,300,300, 11)];
SliderDemo *sliderVctr=[[SliderDemo alloc] initWithFrame:CGRectMake(VctrDtl.bounds.origin.x,VctrDtl.bounds.origin.y,VctrDtl.bounds.size.width, VctrDtl.bounds.size.height)];
sliderVctr.selectedMinimumValue = 0;
sliderVctr.maximumValue = 2000;
sliderVctr.selectedMaximumValue = 2000;
sliderVctr.minimumRange = 00;
[sliderVctr addTarget:self action:@selector(updateRangeLabel:) forControlEvents:UIControlEventValueChanged];
8) Create New Method inside the View controller which is describe int following.
NSLog(@"Slider Range: %f - %f", slider.selectedMinimumValue, slider.selectedMaximumValue);
9) Now Import the header file into view controller.
Expected Results for the Project
Hope that helps.