//slider image can be changed
UISlider *slider = [[UISlider alloc]initWithFrame:CGRectMake(10, 100, 100, 30)];
slider.value = 0.0f;
[self.view addSubview:slider];
//switch image can be changed
UISwitch *mSwitch = [[UISwitch alloc]initWithFrame:CGRectMake(10, 150, 100, 40)];
self.navigationItem.titleView = mSwitch;
//[self.view addSubview:mSwitch];
segmentControl.frame = CGRectMake(150, 150, 200, 30);
[segmentControl insertSegmentWithTitle:@"1" atIndex:0 animated:true];
[segmentControl insertSegmentWithTitle:@"2" atIndex:1 animated:true];
[segmentControl addTarget:self action:@selector(segmentcallback:) forControlEvents:UIControlEventValueChanged];
[segmentControl setWidth:20.0f forSegmentAtIndex:0];
[segmentControl setWidth:20.0f forSegmentAtIndex:1];
[segmentControl setTintColor:[UIColor greenColor]];
[self.view addSubview:segmentControl];
progressview.progress = 0.5f;
progressview.tintColor = [UIColor greenColor];
progressview.frame = CGRectMake(100, 100, 200, 30);
[self.view addSubview:progressview];
UISlider *slider = [[UISlider alloc]initWithFrame:CGRectMake(10, 100, 100, 30)];
slider.value = 0.0f;
[self.view addSubview:slider];
//switch image can be changed
UISwitch *mSwitch = [[UISwitch alloc]initWithFrame:CGRectMake(10, 150, 100, 40)];
self.navigationItem.titleView = mSwitch;
//[self.view addSubview:mSwitch];
segmentControl.frame = CGRectMake(150, 150, 200, 30);
[segmentControl insertSegmentWithTitle:@"1" atIndex:0 animated:true];
[segmentControl insertSegmentWithTitle:@"2" atIndex:1 animated:true];
[segmentControl addTarget:self action:@selector(segmentcallback:) forControlEvents:UIControlEventValueChanged];
[segmentControl setWidth:20.0f forSegmentAtIndex:0];
[segmentControl setWidth:20.0f forSegmentAtIndex:1];
[segmentControl setTintColor:[UIColor greenColor]];
[self.view addSubview:segmentControl];
progressview.progress = 0.5f;
progressview.tintColor = [UIColor greenColor];
progressview.frame = CGRectMake(100, 100, 200, 30);
[self.view addSubview:progressview];