ScrollFlowLabel 1.0.4

ScrollFlowLabel 1.0.4

Yuya Oka维护。



ScrollFlowLabel

在滚动时自动显示UILabel上的长文本。

Swift 5.0.1 MIT License Release

安装

CocoaPods

pod 'ScrollFlowLabel'

Carthage

github "nnsnodnb/ScrollFlowLabel" ~> 1.0.0

Swift包管理器

// swift-tools-version:5.0
import PackageDescription

let package = Package(
    name: "SampleApp",
    dependencies: [
        .package(name: "ScrollFlowLabel",
                 url: "https://github.com/nnsnodnb/ScrollFlowLabel.git",
                 from: "1.0.0")
    ],
    targets: [
        .target(name: "SampleApp", dependencies: ["ScrollFlowLabel"])
    ]
)

示例

编写源代码

let label = ScrollFlowLabel()
label.text = "Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor..."
label.textColor = .black
label.textAlignment = .left
label.font = .systemFont(ofSize: 20)
label.pauseInterval = 2
label.scrollDirection = .left
label.scrollSpeed = 20
label.observeApplicationState() // If you want to observe UIApplicationState.

接口构建器

将任何地方 Ihres UIView 并将自定义类改为 ScrollFlowLabel

许可

ScrollFlowLabel在MIT许可证下发布。详细信息请参阅许可