Git Product home page Git Product logo

okklineswift's Introduction

OKKLineSwift

前言

😄 OKKLineSwift是本人用Swift3编写的绘制股票K线库

Screenshot

iOS Screenshot [支持拖动手势, 长按手势(查看详情), 捏合手势(放大缩小)]

OKKLineSwift

macOS Screenshot [支持拖动事件,十字线跟随,鼠标滚动事件(放大缩小)]

OKKLineSwift

Support

Swift 3.0

iOS 8+

macOS 10.10+

Installation

Manually

因为绘制K线大部分工作都是在UI层,而UI层又是最易变的,目前不打算以Cocoapods方式提供

  1. Download the full file.
  2. Drag the OKKLineSwift folder to your project.

源码目录(所有源码均放在Source文件夹下)

目录 说明
Configuration OKConfiguration.swift - 这是一个全局控制类,控制全局主题(e.g. 颜色,字号等
Views OKKLineView - 此类是所有视图的父视图
OKKLineDrawView.swift - 此类是所有涉及K线视图的父视图,负责处理手势和数据源
OKValueView.swift - 此类负责绘制价格
1、MainView:
OKKLineMainView.swift - 此类负责主图的绘制
2、VolumeView:
OKKLineVolumeView.swift - 此类负责成交量视图的绘制
3、AccessoryView:
OKKLineAccessoryView.swift - 此类负责指标视图的绘制
4、SegmentView:
OKSegmentView.swift - 此类负责显示时间线或者指标类型
Models 数据模型目录,主要是K线数据以及各种指标模型
Tools 工具类目录,例如:OKLineBrush.swift - 负责画线的类, OKMALineBrush.swift - 负责画均线的类

TODO

  • 支持 macOS 系统
  • 支持更多指标类型

Licenses

本项目所有OK-开头的源码遵守MIT license.

Contributions

欢迎各位贡献你们的思路和代码! 您可以在这里pull requests和issues我! 👏

okklineswift's People

Contributors

herbsun avatar

Watchers

James Cloos avatar Lerist avatar  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.