-
Notifications
You must be signed in to change notification settings - Fork 0
/
ContentView.swift
31 lines (29 loc) · 978 Bytes
/
ContentView.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import SwiftUI
import ExtoleMobileSDK
struct ContentView: View {
@EnvironmentObject var extoleCampaign: ExtoleCampaign
var body: some View {
NavigationView {
VStack {
AsyncImage(url: URL(string: extoleCampaign.cta.image))
.frame(height: 400)
.aspectRatio(contentMode: .fit)
.clipShape(Circle())
.overlay(Circle().stroke(Color.gray, lineWidth: 4))
.shadow(radius: 7)
Button(extoleCampaign.cta.text) {
extoleCampaign.extole.sendEvent(extoleCampaign.cta.touchEvent, [:], completion: { (idEvent, error) in
})
}.padding()
Spacer()
}.task {
extoleCampaign.fetch()
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}