Use UISlider to create a slide for the specified range and place it in the view of the attempt controller. @ Interface SliderView: UIViewController @ property (non atomic, strong) UISlider * mySlider; @ end @ synthesize mySlider;-(void) viewDidLoad {[super viewDidLoad]; self. view. backgroundColor = [UIColor whiteColor]; self. mySlider = [[UISlider alloc] initWithFrame: CGRectMake (0.0f, 0.0f, 200366f, 23.0f)]; self. mySlider. center = self. view. center; self. mySlider. minimumValue = 0.0f; // the minimum value of the selected range self. mySlider. maximumValue = 10010000f; // select the maximum self in the range. mySlider. value = self. mySlider. maximumValue/2.0; // current value self. mySlider. continuous = NO; // The default value is YES. If YES, the slider d target is called continuously when thumb slides. [Self. mySlider addTarget: self action: @ selecter (sliderValueChanged :) forControlEvents: UIControlEventValueChanged]; [self. view addSubView: self. mySlider];} the slider on the slider is called thumb; target-(void) sliderValueChanged :( UISlider *) paramSender {if ([paramSender isEqual: self. mySlider]) {NSLog (@ "% @", paramSender. value) ;}} select setThumbImage: forState: Method UIControlStateNormal from the thumb image of slider. // thumb in normal state is not clicked. UIControlStateHighlighted // The selected thumb, that is, the image displayed when you click thumb [self. mySlider setThumbImage: [UIImage imaged: @ "ThumbNormal.png"] forState: UIControlStateNormal]; [self. mySlider setThumbImage: [UIImage imaged: @ "success"] forState: Success]; UISegmentedControl: simple option grouping @ interface SegmentedControl: UIViewController @ property (non atomic, strong) UISegmentedControl * mySegmentedControl; @ end; @ synthesize mySegmentedControl;-(void) viewDidLoad {[super viewDidLoad]; self. view. backgrounderColor = [UIColor whiteColor]; NSArray * segments = [[NSArray alloc] initWithObjects: @ "iPhone", @ "iPad", nil]; self. mySegmentedControl = [[UISegmentedControl alloc] initWithItems: segments]; self. mySegmentedControl. center = self. view. center; [self. view addSubview: self. mySegmentedControl];}