//
//  ViewController.m
//  UI4_UIStepper与UIProgressView
//
//  Created by zhangxueming on 15/7/7.
//  Copyright (c) 2015年 zhangxueming. All rights reserved.
//#import "ViewController.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad {[super viewDidLoad];// Do any additional setup after loading the view, typically from a nib.//步进器(94*29)UIStepper *step = [[UIStepper alloc] initWithFrame:CGRectMake(100, 200, 0, 0)];NSLog(@"step = %@", step);//设置步进器的连续性step.continuous = YES;//设置步长step.stepValue = 0.01;//设置最小值step.minimumValue  = 0;//设置最大值step.maximumValue  = 1;//step.tintColor = [UIColor redColor];//[step setBackgroundImage:[UIImage imageNamed:@"truckmin"] forState:UIControlStateNormal];//添加点击事件[step addTarget:self action:@selector(stepValueChange:) forControlEvents:UIControlEventValueChanged];[self.view addSubview:step];//进度条UIProgressView *progress = [[UIProgressView alloc] initWithProgressViewStyle:UIProgressViewStyleDefault];progress.frame = CGRectMake(10, 400, self.view.frame.size.width-20, 10);progress.tintColor = [UIColor cyanColor];progress.trackTintColor = [UIColor redColor];//进度progress.progress = 0.0;progress.tag = 100;[self.view addSubview:progress];}- (void)stepValueChange:(UIStepper *)step
{NSLog(@"%.2f", step.value);UIProgressView *progressView = (UIProgressView *)[self.view viewWithTag:100];progressView.progress = step.value;}- (void)didReceiveMemoryWarning {[super didReceiveMemoryWarning];// Dispose of any resources that can be recreated.
}@end

转载于:https://www.cnblogs.com/0515offer/p/4638795.html

UI4_UIStepper与UIProgressView相关推荐

  1. iOS指示器之UIProgressView和UIPageControl

    UIControl不仅能用来收集输入,还可以向用户反馈信息.指示器用来向用户反馈进度或者一般的信息.iOS有三个常用的指示器,分别是UIActivityIndicatorView.UIProgress ...

  2. UIProgressView(进度条控件)

    UIProgressView *pr=[[UIProgressView alloc]init]; pr.frame=CGRectMake(150.0, 190.0, 130.0, 30.0);//进度 ...

  3. swift 实践- 10 -- UIProgressView

    import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoa ...

  4. UI第九节——UIProgressView

    - (void)viewDidLoad {     [super viewDidLoad];          // 实例化 UIProgressView,高度是固定的     UIProgressV ...

  5. 【IOS 开发】基本 UI 控件详解 (UISegmentedControl | UIImageView | UIProgressView | UISlider | UIAlertView )

    转载请注明出处 : http://blog.csdn.net/shulianghan/article/details/50163725 一. 分段控件 (UISegmentedControl) 控件展 ...

  6. UIActionSheet和UIProgressView的组合

    2019独角兽企业重金招聘Python工程师标准>>> - (void) incrementBar: (id) timer {amountDone += 1.0f;[progress ...

  7. UIProgressView的使用

    最近使用UIProgressView这个控件,设置了frame UIProgressView *progressView = [[UIProgressView alloc] initWithFrame ...

  8. UIActivityIndicatorView、UIProgressView 活动与进度指示器 (实例)

    活动指示器(UIActivityIndicatorView)可以告知用户有一个操作正在进行中.进度指示器(UIProgressView )也具有同样功能,而且还可以告知用户离操作结束还多远. 这两个指 ...

  9. UIProgressView的详细使用

    UIProgressView顾名思义用来显示进度的,如音乐,视频的播放进度,和文件的上传下载进度等. 下面以一个简单的实例来介绍UIprogressView的使用. @interface Activi ...

最新文章

  1. delphi 数据库显示的TDBGrid配置
  2. boost learn notes
  3. ZOJ 2770 Burn the Linked Camp 差分约束+SPFA
  4. N*N匹马,N个赛道,求出最快N匹马的解法
  5. 《论文笔记》Cooperative Multi-Robot Monocular-SLAM using Salient Landmarks
  6. 纯js实现瀑布流布局及ajax动态新增数据
  7. 信息安全等级保护分为几个级别呢?
  8. pytho sockt编程
  9. 零基础转行大数据怎么学习?大数据学习路线
  10. Centos7 升级 glibc 2.25
  11. AUTOSAR MCAL解析:Wdg
  12. springboot 将本地引用的lib一起打包
  13. html代码的魔方加密,三维魔方加密算法如何给文本文件加密
  14. VBA中数组72变(随心所欲复制)
  15. 关于系统之间的单点登陆对接
  16. 风控中所涉及的重要指标全解析
  17. 灵魂有香气的女子李筱懿:为人处世要“沉住气”
  18. 关于mac上输入 insert和replace的快捷键切换
  19. 十大排序算法思想和代码总结(Python版)
  20. 大学生申请创新创业训练计划项目之我见

热门文章

  1. 前端笔记——获取url里面的参数值
  2. 解决ubuntu下无线网络不可用
  3. LUA脚本调用C场景,使用C API访问脚本构造的表
  4. BZOJ 1251: 序列终结者( splay )
  5. 让jquery easyui datagrid列支持绑定嵌套对象
  6. (译)Web地图设计模式——ArcGIS Server
  7. Docker容器制作
  8. 一个网卡设置多个IP作用
  9. mysql查询当前use的数据库
  10. 电脑日常故障及处理(二)