Skip to content

Animate placeholder transition #26

Discussion options

You must be logged in to vote

I added transition modifier in version 2.1.2 #27
You can use it like this 😆

import SwiftUI
import RichText

struct RichText_Test: View {
    @State private var  html = ""
    
    var body: some View {
       ScrollView{
            RichText(html: html)
                .placeholder {
                    Text("loading")
                }
                .transition(.easeOut)
        }
    }
}

struct RichText_Test_Previews: PreviewProvider {
    static var previews: some View {
        RichText_Test()
    }
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by stanislavlysenko0912
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants