Code Monkey home page Code Monkey logo

timelinetableviewcell's Introduction

TimelineTableViewCell

TimelineTableViewCell is a simple timeline view implemented by UITableViewCell written in Swift 3.0. The UI design of TimelineTableViewCell is inspired by ISTimeline.

Language Swift 3.0 CocoaPods Swift Package Manager compatible License

TimelineTableViewCell

Requirements

  • iOS 8.0 or higher
  • Swift 3.0

Installation

pod "TimelineTableViewCell"
.Package(url: "https://github.com/kf99916/TimelineTableViewCell.git", majorVersion: 1.0)

Usage

Import

import TimelineTableViewCell

Integration

Register Nib

let bundle = Bundle(for: TimelineTableViewCell.self)
let nibUrl = bundle.url(forResource: "TimelineTableViewCell", withExtension: "bundle")
let timelineTableViewCellNib = UINib(nibName: "TimelineTableViewCell", 
	bundle: Bundle(url: nibUrl!)!)
tableView.register(timelineTableViewCellNib, forCellReuseIdentifier: "TimelineTableViewCell")

Dequeue

let cell = tableView.dequeueReusableCell(withIdentifier: "TimelineTableViewCell", 
	for: indexPath) as! TimelineTableViewCell

// Configure TimelineTableViewCell...

TimelinePoint

The point in line is represented by a TimelinePoint object.
var diameter: CGFloat the diameter of a point in the line (default 6.0)
var lineWidth: CGFloat the thickness of the point (default 2.0)
var color: UIColor the color of each point in the line (defalut UIColor.black)
var isFilled: Bool fills the point in the line (default: false)

Initializers

TimelinePoint(diameter: CGFloat, lineWidth: CGFloat, color: UIColor, filled: Bool)
TimelinePoint(diameter: CGFloat, color: UIColor, filled: Bool)
TimelinePoint(color: UIColor, filled: Bool)
TimelinePoint()

Timeline

The line in the cell is represented by a Timeline object and is divided by the point as the front line and the backline.
var width: CGFloat the thickness of the line (default 2.0)
var frontColor: UIColor the color of the front line (defalut UIColor.black)
var backColor: UIColor the color of the back line (defalut UIColor.black)

Initializers

Timeline(width: CGFloat, frontColor: UIColor, backColor: UIColor)
Timeline(frontColor: UIColor, backColor: UIColor)
Timeline()

TimelineTableViewCell

The cell is represented by a TimelineTableViewCell object.
titleLabel: UILabel! the title in the bubble
descriptionLabel: UILabel! the description
lineInfoLabel: UILabel! the information about line
thumbnailImageView: thumbnailImageView! the thumbnail
var bubbleRadius: CGFloat the radius of the bubble corners (default 2.0)
var bubbleColor: UIColor the color of every bubble (default .init(red: 0.75, green: 0.75, blue: 0.75, alpha: 1.0))

Demo

TimelineTableViewCellDemo is a simple demo app which shows the usage of TimelineTableViewCell in a storyboard.

Author

Zheng-Xiang Ke, [email protected]

License

TimelineTableViewCell is available under the MIT license. See the LICENSE file for more info.

timelinetableviewcell's People

Contributors

dendim0n avatar kf99916 avatar

Watchers

 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.