码迷,mamicode.com
首页 > 其他好文 > 详细

OneDayOneClass----UIStepper

时间:2015-04-15 19:36:36      阅读:109      评论:0      收藏:0      [点我收藏+]

标签:ui

// Created By 郭仔

UIStepper 加减法器:

<pre name="code" class="objc"> UILabel * leb = [[UILabel alloc]initWithFrame:CGRectMake(100, 200, 100, 100)];
    leb.backgroundColor = [UIColor redColor];
    self.label = leb;
    [self.window addSubview:leb];
    // ==========
    UIStepper * stepper = [[UIStepper alloc]init];
   // [stepper setCenter:self.window.center];
    stepper.frame = CGRectMake(100, 100, 200, 200);
    stepper.tintColor = [UIColor blueColor];
    stepper.value = 10;
    [stepper setMaximumValue:15.0];
    [stepper setMinimumValue:0.0];
    
    //[stepper setValue:5.5];
    [stepper setStepValue:1];
    // 是否循环
    [stepper setWraps:YES];
    // 设定stepper可以按住不放连续更改数值
    [stepper setContinuous:YES];
    [stepper addTarget:self action:@selector(steepValueschanged:) forControlEvents:UIControlEventValueChanged];
    [self.window addSubview:stepper];
    
    



事件紧迫,不写具体的了,API自己搞~~~~

OneDayOneClass----UIStepper

标签:ui

原文地址:http://blog.csdn.net/guoxianzhuang/article/details/45063067

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!