Answers for "How to initialize data in Preview provider in SwiftUI"

0

How to initialize data in Preview provider in SwiftUI

struct StoryDetails_Previews: PreviewProvider {
    static var previews: some View {
        StoryDetails(
            story: Story(
                id: 1,
                author: 1,
                body: "Testing",
                edited_time: "September 2019",
                pub_date: "October 2018",
                comments: [Comment](),
                story_likes: [StoryLike]()
             )
        )
Posted by: Guest on June-25-2020

Code answers related to "How to initialize data in Preview provider in SwiftUI"

Code answers related to "Swift"

Browse Popular Code Answers by Language