git实战(1)--git简介
2015-07-09 19:02
211 查看
#import <Foundation/Foundation.h> @interface MySlider : UISlider { } @end
#import "MySlider.h" @implementation MySlider - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; return self; } - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { CGRect t = [self trackRectForBounds: [self bounds]]; float v = [self minimumValue] + ([[touches anyObject] locationInView: self].x - t.origin.x - 4.0) * (([self maximumValue]-[self minimumValue]) / (t.size.width - 8.0)); [self setValue: v]; [super touchesBegan: touches withEvent: event]; } @end
相关文章推荐
- JAVA判断字符串是否为数字
- 小胖学PHP总结2-----PHP的b变量和赋值
- Uml类图
- FloatinActionButton以及SnackBar的使用
- Scala语法要点
- 求任意多边形的面积--差称法
- cmd下不能运行python解决方法
- 怎样合理地定义用户流失
- 网络协议相关
- c++ 函数库查询
- 复高斯分布证明
- linux系统初始化脚本
- JPA总结——实体关系映射(一对多@OneToMany)
- Android设计模式学习之单例模式
- HDU4387 Stone Game
- ZOJ1041 Transmitters
- Linux中fdisk命令
- C++ HOJ 猴子分桃
- canvas 基础知识整理(二)
- APNS - Apple Push Notification Service