项目
在 GitHub 查看
cbess/AutoScrollLabel
关于
让 UILabel 像跑马灯一样滚动,类似 Music.app 中滚动显示的曲目标题。适用于 Objective-C 和 Swift。
设计与媒体实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文AutoScrollLabel
A UILabel with auto scrolling for text that may be clipped by the view. Provides edge fading, speed adjustment, scroll direction, etc.

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
Real world use:
Sola Tunes iOS App (Free)
VerseCloud (Free)
License
MIT - Copyright (c) 2019 Christopher Bess
探索相关项目
加载中…