A powerful implementation of Marquee (scrolling text or label) in SwiftUI, which supports any content view, including text, image, video, etc.
- Supports any content view powered by ViewBuilder.
- Supports autoreverses.
- Supports custom duration.
- Supports custom direction.
- left2right
- right2left
- Marquee when content view not fit.
In Xcode go to File -> Swift Packages -> Add Package Dependency
and paste in the repo's url:
https://github.com/stonko1994/Marquee
import SwiftUI
import Marquee
struct ContentView: View {
var body: some View {
Marquee {
Text("Hello World!")
.fontWeight(.bold)
.font(.system(size: 40))
}
}
}