Git Product home page Git Product logo

rulerpicker's Introduction

RulerPicker

一个刻度尺类型的时间选择控件,可用于选择时间点

效果图:

控件的可定制度较高,后续会慢慢优化

使用:

1 . 将 RulerPicker 目录下的 VNBRluerPicker 文件添加到你的工程中 2 . 在需要使用的地方 #import "VNBRluerPicker.h" 3 . 创建并显示:

VNBRluerPicker myRulerPicker = [[VNBRluerPicker alloc] initWithFrame:CGRectMake(10, 160, 300, 70) BigUnit:24 smallUnits:6];
myRulerPicker.rulerValue = @"12:00:00";
myRulerPicker.delegate = self;
myRulerPicker.triangleHeight = 5;
[myRulerPicker show];
[self.view addSubview:myRulerPicker];

4 . VNBTimeRulerDelegate , 默认提供了 4 个代理方法,你可以根据自己的需求继续添加

- (void)rulerScrollViewWillBeginDragging:(VNBRluerPicker *)rulerPicker;
- (void)rulerScrollViewDidScroll:(VNBRluerPicker *)rulerPicker;
- (void)rulerScrollViewDidEndDecelerating:(VNBRluerPicker *)rulerPicker;
- (void)rulerScrollViewDidEndDragging:(VNBRluerPicker *)rulerPicker willDecelerate:(BOOL)decelerate;

自定义外观

留了很多的属性可以自定义,但是要记得操作顺序为先 initWithFrame,后设置各种需要自定义的属性,最后调用 show 方法

如果有任何疑问和建议,欢迎交流。

rulerpicker's People

Contributors

vanbein avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rulerpicker's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.