NuPlay/SwiftUI-SlideText 0.2.0
Easy way to make Slide in Text in SwiftUI
⭐️ 13
🕓 2 years ago
iOS
macOS
tvOS
.package(url: "https://github.com/NuPlay/SwiftUI-SlideText.git", from: "0.2.0")
SlideText
|
|
Code |
PreView |
Code
import SwiftUI
import SlideText
struct SlideText_Test: View {
var text : String = "SwiftUI-SlideText Test"
var body: some View {
VStack{
SlideText(text: text, frameWidth: 100)
SlideText(text: text, frameWidth: 150, fontSize: 30, fontWeight: .bold, animationDuration: 5, delay: 1)
}
}
}
How To Use
- text : which one you want to show
- frameWidth : frameWidth
- I want to delete this and just follow the view size later
- animationDuration : animationDuration
- delay : when the animation reaches the end How long to wait