Skip to content
プロジェクト

cbess/AutoScrollLabel

GitHubで見る

概要

Music.appで曲名が流れるように、UILabelのテキストをマーキー表示できます。Objective-CとSwiftに対応しています。

デザイン・メディア

この数値の測り方

計測したスター増加

24時間
0
7日間
0
15日間
0
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

AutoScrollLabel

A UILabel with auto scrolling for text that may be clipped by the view. Provides edge fading, speed adjustment, scroll direction, etc.

screenshot screenshot2

iOS 12, tvOS 12 and greater.

Installation

Swift Package Manager

In Xcode, choose File > Add Package Dependencies... and enter the repository URL:

https://github.com/cbess/AutoScrollLabel.git

Or add it to the dependencies of your Package.swift:

dependencies: [
    .package(url: "https://github.com/cbess/AutoScrollLabel.git", commit: "<HASH>")
]

Then add "AutoScrollLabel" to your target's dependencies.

Usage

// objc
@import AutoScrollLabel;
// swift
import AutoScrollLabel
autoScrollLabel.text = @"This text may be clipped, but now it will be scrolled.";
autoScrollLabel.textColor = [UIColor systemBlueColor];
autoScrollLabel.labelSpacing = 35; // distance between start and end labels
autoScrollLabel.pauseInterval = 3.7; // seconds of pause before scrolling starts again
autoScrollLabel.scrollSpeed = 30; // pixels per second
autoScrollLabel.textAlignment = NSTextAlignmentCenter; // centers text when no auto-scrolling is applied
autoScrollLabel.fadeLength = 12.f; // length of the left and right edge fade, 0 to disable

Soli Deo gloria

Real world use:

Sola Tunes iOS App (Free)
VerseCloud (Free)

License

MIT - Copyright (c) 2019 Christopher Bess

関連プロジェクトを探す

読み込み中…