Latest 0.1.1
Homepage https://github.com/KenShih522/KSTimeline
License MIT
Platforms ios 10.0, requires ARC
Authors

KSTimeline, written in swift, is a simple and customizable view which supports showing a series of events in a vertically time-sorted structure.

Preview

Demo1

  • adjust the time scale by pinch gesture
  • display different time mode according to time scale

Demo2

  • play next event automatically
  • scroll to seek video
  • press > to next video
  • press < to previous video

Usage

Delegate

@objc public protocol KSTimelineDelegate: NSObjectProtocol {

    func timelineStartScroll(_ timeline: KSTimelineView)

    func timelineEndScroll(_ timeline: KSTimelineView)

    func timeline(_ timeline: KSTimelineView, didScrollTo date: Date)

}

Datasource

@objc public protocol KSTimelineDatasource: NSObjectProtocol {

    func numberOfEvents(_ timeline: KSTimelineView) -> Int

    func event(_ timeline: KSTimelineView, at index: Int) -> KSTimelineEvent

}

KSTimelineEvent

@objc public class KSTimelineEvent: NSObject {

    public var start: Date

    public var end: Date

    public var duration: Double

    public var videoURL: URL

    public init(start: Date, end: Date, duration: Double, videoURL: URL) {

        self.start = start

        self.end = end

        self.duration = duration

        self.videoURL = videoURL

        super.init()

    }

}

Latest podspec

{
    "name": "KSTimeline",
    "version": "0.1.1",
    "summary": "KSTimeline, written in swift, is a simple and customizable view which supports showing a series of events in a vertically time-sorted structure.",
    "homepage": "https://github.com/KenShih522/KSTimeline",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "KenShih522": "[email protected]"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source": {
        "git": "https://github.com/KenShih522/KSTimeline",
        "tag": "0.1.1"
    },
    "source_files": [
        "KSTimeline/Info.plist",
        "KSTimeline/KSTimeline.h",
        "KSTimeline/KSTimelineContentView.swift",
        "KSTimeline/KSTimelineRulerView.swift",
        "KSTimeline/KSTimelineView.swift"
    ],
    "requires_arc": true,
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This