Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nnsnodnb/scrollflowlabel

Display long text on UILabel while scrolling automatically.
https://github.com/nnsnodnb/scrollflowlabel

flow-label ios uilabel xcode

Last synced: about 2 months ago
JSON representation

Display long text on UILabel while scrolling automatically.

Awesome Lists containing this project

README

        

ScrollFlowLabel


Display long text on UILabel while scrolling automatically.



Swift 5.0.1

MIT License

Release

## Installation

### CocoaPods

```ruby
pod 'ScrollFlowLabel'
```

### Carthage

```
github "nnsnodnb/ScrollFlowLabel" ~> 1.0.0
```

### Swift Package Manager

```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"])
]
)
```

## Example

### Write source

```swift
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.
```

### Interface Builder

Set **UIView** to any place and change Custom Class to **ScrollFlowLabel**.

## LICENSE

[ScrollFlowLabel](https://github.com/nnsnodnb/ScrollFlowLabel) is released under the MIT license. See [LICENSE](LICENSE) for details.