<span style="font-family:Menlo;">
</span><p style="margin-top: 0px; margin-bottom: 0px; font-size: 18px; font-family: Menlo; color: rgb(52, 149, 175);">UIActionSheet选择框 在下面红线的地方,也有截图</p>
<span style="font-family: Menlo;">
</span>
<span style="font-family: Menlo;">
</span>
<span style="font-family: Menlo;">- (void)viewDidLoad</span>
{
[superviewDidLoad];
// Do any additional setup after loading the view.
/***************************/
/* UISwitch */
/* =================== */
/* 开关按键 */
/* =================== */
/***************************/
UISwitch *swithch=[[UISwitchalloc]initWithFrame:CGRectMake(10,100,10, 10)];
//设置边框颜色
swithch.tintColor=[UIColorredColor];
//设置开的时候的背景颜色
swithch.onTintColor=[UIColororangeColor];
//设置按键自身的颜色
swithch.thumbTintColor=[UIColorblueColor];
//添加按键响应事件
[swithch addTarget:selfaction:@selector(switchClick:)forControlEvents:UIControlEventValueChanged];
self.view.backgroundColor=[UIColorbrownColor];
[self.viewaddSubview:swithch];
/***************************/
/* UISlider */
/* =================== */
/* 控制微量变化 */
/* =================== */
/***************************/
UISlider *slider=[[UISlideralloc]initWithFrame:CGRectMake(10,150,300, 10)];
//设置slider的最小值
slider.minimumValue=0;
//设置slider的最大值
slider.maximumValue=5;
//设置一开始显示时的值
slider.value=1.5;
//设置最小值轨道颜色
slider.minimumTrackTintColor=[UIColorredColor];
//设置最大值轨道颜色
slider.maximumTrackTintColor=[UIColorpurpleColor];
//设置最小值图片
slider.minimumValueImage=[UIImageimageNamed:@"1.png"];
//设置最大值图片
slider.maximumValueImage=[UIImageimageNamed:@"1.png"];
//设置按键的图片
[slider setThumbImage:[UIImageimageNamed:@"1.