Snail—UI学习之数字输入控件UIStepper
来源:互联网 发布:佳能官方网站软件下载 编辑:程序博客网 时间:2024/05/29 15:43
- (void)viewDidLoad{ [super viewDidLoad];// Do any additional setup after loading the view. self.view.backgroundColor = [UIColor redColor]; [self createStepper]; [self createLabel];}- (void)createLabel{ _label = [[UILabel alloc] initWithFrame:CGRectMake(100, 70, 50, 50)]; _label.text = @"10"; _label.backgroundColor = [UIColor greenColor]; _label.textAlignment = NSTextAlignmentCenter; [self.view addSubview:_label];}- (void)createStepper{ //stepper 不受宽、高的影响、是固定的 UIStepper * stepper = [[UIStepper alloc] initWithFrame:CGRectMake(100, 200, 100, 100)]; //设置最小值 stepper.minimumValue = 10; //最大值 stepper.maximumValue = MAXFLOAT; //设置每次增加的单位大小 stepper.stepValue = 10; //长按速度加快 stepper.continuous = YES; //加到最大变成最小值 减到最小值变成最大值 stepper.autorepeat = YES; stepper.wraps = YES; //添加点击事件 UIControlEventTouchValueChanged [stepper addTarget:self action:@selector(changed:) forControlEvents:UIControlEventValueChanged]; [self.view addSubview:stepper];}
0 0
- Snail—UI学习之数字输入控件UIStepper
- UI 数字输入控件UIStepper
- Snail—UI学习浏览器控件UIWebView
- Snail—UI学习之初识
- Snail—UI学习之UILabel
- Snail—UI学习之UIButton
- Snail—UI学习之动画Animations
- Snail—UI学习之UITextField
- Snail—UI学习之进度条UIProgressView
- Snail—UI学习之UISegmentControl
- Snail—UI学习之开关UISwith
- Snail—UI学习之工具栏UIToolBar
- 【IOS 开发学习总结-OC-49】★★ios开发之UI控件——UIStepper与UIWebView
- Snail—UI学习之UITableView之分组显示
- Snail—UI学习之UITableView之自定义UITableViewCell
- Snail—UI学习之得到某组件的方法
- Snail—UI学习之UIImage及UIImageView
- Snail—UI学习之自定义通知NSNotification
- 象棋AI算法(二)
- HDU 2030 汉字统计
- 男儿当自强
- Socket Intro - SIGPIPE and EPIPE
- hdu1863
- Snail—UI学习之数字输入控件UIStepper
- Windows 10 RTM 官方正式版
- 欢迎使用CSDN-markdown编辑器
- DL方法与问题空间探索
- NYOJ 南阳oj 懒省事的小明 题目55
- ORACLE的执行计划
- oc基础
- HTTP长连接与短连接
- Mysql设置允许外网访问(图文)