Coder Social home page Coder Social logo

zcgong / prettyruler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from raybon-lee/prettyruler

0.0 2.0 0.0 164 KB

一个漂亮的横向刻度尺自定义控件,用CAShapeLayer实现高效GPU渲染

License: MIT License

Ruby 24.64% Objective-C 75.36%

prettyruler's Introduction

PrettyRuler

一个漂亮的横向刻度尺自定义控件,用CAShapeLayer实现高效GPU渲染,没有用一张图片! 控件两边添加渐变透明效果,看起来更加自然。使用方法具体看demo,简单易懂,几句代码搞定,但是该自定义控件只支持代码方式创建。

#说明 iOS7 +,刻度选择支持选择0值,为最小模式,不能选择0值时候,为正常模式,具体请看最下面效果图。

#支持pod安装 pod 'PrettyRuler', '~> 2.1.1'

#用法

  1. 拖拽class文件夹到你的项目
  2. 在你的控制器里导入 TXHRrettyRuler.h
  3. 类似以下这段代码 TXHRrettyRuler *ruler = [[TXHRrettyRuler alloc] initWithFrame:CGRectMake(20, 220, [UIScreen mainScreen].bounds.size.width - 20 * 2, 140)]; ruler.rulerDeletate = self; [ruler showRulerScrollViewWithCount:200 average:1 currentValue:36.5f smallMode:YES]; [self.view addSubview:ruler];

#效果图 1.最小模式也就是当smallMode = yes。

Smaller icon

2.正常模式也就是smellmode = no。

Smaller icon

prettyruler's People

Watchers

James Cloos avatar zcgong avatar

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.