Skip to content

Instantly share code, notes, and snippets.

@MarcoEidinger
Last active September 4, 2021 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcoEidinger/a38e7315a834351e8bde15ad8753dc74 to your computer and use it in GitHub Desktop.
Save MarcoEidinger/a38e7315a834351e8bde15ad8753dc74 to your computer and use it in GitHub Desktop.
Gists for "Rich and interactive cards in SwiftUI" blog post. Original: https://github.com/MarcoEidinger/ms-adaptivecards-ios-example
import SwiftUI
struct ContentView: View {
var body: some View {
AdaptiveCardView(cardJson: "{ \"type\": \"AdaptiveCard\", \"version\": \"1.0\", \"body\": [ { \"type\": \"Image\", \"url\": \"http://adaptivecards.io/content/adaptive-card-50.png\", \"horizontalAlignment\":\"center\" }, { \"type\": \"TextBlock\", \"horizontalAlignment\":\"center\", \"text\": \"Hello **Adaptive Cards!**\" } ], \"actions\": [ { \"type\": \"Action.OpenUrl\", \"title\": \"Learn more\", \"url\": \"http://adaptivecards.io\" }, { \"type\": \"Action.OpenUrl\", \"title\": \"GitHub\", \"url\": \"http://github.com/Microsoft/AdaptiveCards\" }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment