UI4_UIStepper与UIProgressView
//
// 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相关推荐
- iOS指示器之UIProgressView和UIPageControl
UIControl不仅能用来收集输入,还可以向用户反馈信息.指示器用来向用户反馈进度或者一般的信息.iOS有三个常用的指示器,分别是UIActivityIndicatorView.UIProgress ...
- UIProgressView(进度条控件)
UIProgressView *pr=[[UIProgressView alloc]init]; pr.frame=CGRectMake(150.0, 190.0, 130.0, 30.0);//进度 ...
- swift 实践- 10 -- UIProgressView
import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoa ...
- UI第九节——UIProgressView
- (void)viewDidLoad { [super viewDidLoad]; // 实例化 UIProgressView,高度是固定的 UIProgressV ...
- 【IOS 开发】基本 UI 控件详解 (UISegmentedControl | UIImageView | UIProgressView | UISlider | UIAlertView )
转载请注明出处 : http://blog.csdn.net/shulianghan/article/details/50163725 一. 分段控件 (UISegmentedControl) 控件展 ...
- UIActionSheet和UIProgressView的组合
2019独角兽企业重金招聘Python工程师标准>>> - (void) incrementBar: (id) timer {amountDone += 1.0f;[progress ...
- UIProgressView的使用
最近使用UIProgressView这个控件,设置了frame UIProgressView *progressView = [[UIProgressView alloc] initWithFrame ...
- UIActivityIndicatorView、UIProgressView 活动与进度指示器 (实例)
活动指示器(UIActivityIndicatorView)可以告知用户有一个操作正在进行中.进度指示器(UIProgressView )也具有同样功能,而且还可以告知用户离操作结束还多远. 这两个指 ...
- UIProgressView的详细使用
UIProgressView顾名思义用来显示进度的,如音乐,视频的播放进度,和文件的上传下载进度等. 下面以一个简单的实例来介绍UIprogressView的使用. @interface Activi ...
最新文章
- delphi 数据库显示的TDBGrid配置
- boost learn notes
- ZOJ 2770 Burn the Linked Camp 差分约束+SPFA
- N*N匹马,N个赛道,求出最快N匹马的解法
- 《论文笔记》Cooperative Multi-Robot Monocular-SLAM using Salient Landmarks
- 纯js实现瀑布流布局及ajax动态新增数据
- 信息安全等级保护分为几个级别呢?
- pytho sockt编程
- 零基础转行大数据怎么学习?大数据学习路线
- Centos7 升级 glibc 2.25
- AUTOSAR MCAL解析:Wdg
- springboot 将本地引用的lib一起打包
- html代码的魔方加密,三维魔方加密算法如何给文本文件加密
- VBA中数组72变(随心所欲复制)
- 关于系统之间的单点登陆对接
- 风控中所涉及的重要指标全解析
- 灵魂有香气的女子李筱懿:为人处世要“沉住气”
- 关于mac上输入 insert和replace的快捷键切换
- 十大排序算法思想和代码总结(Python版)
- 大学生申请创新创业训练计划项目之我见