ProfileView.swift
3.7 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//
// ProfileView.swift
// warplyFramework
//
// Created by Βασιλης Σκουρας on 13/1/22.
//
import SwiftUI
@available(iOS 13.0.0, *)
struct ProfileView: View {
let uiscreen = UIScreen.main.bounds
@State private var bottomRect: CGRect = .zero
var body: some View {
ScrollView {
VStack {
// var instanceOfMyApi = MyApi()
// var myJson = instanceOfMyApi.getProfile() as AnyObject?
ZStack {
Image("logo", bundle: Bundle(identifier:"framework.warp.ly.warplySDKFramework"))
.resizable()
.frame(width: self.uiscreen.height * 0.025, height: self.uiscreen.height * 0.02)
.offset(x: -self.uiscreen.width / 2 + self.uiscreen.width * 0.05, y: self.uiscreen.height * 0.04)
Text("Το προφίλ μου")
.frame(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.025, alignment: .center)
.offset( y: self.uiscreen.height * 0.04)
}
.frame(width: self.uiscreen.width)
// Rectangle()
//
// .foregroundStyle(
// .linearGradient(
// colors: [Color.init(UIColor(red: 82.0/255.0, green: 223.0/255.0, blue: 90.0/255.0, alpha: 1.0)), Color.init(UIColor(red: 29.0/255.0, green: 168.0/255.0, blue: 122.0/255.0, alpha: 1.0)), Color.init(UIColor(red: 4.0/255.0, green: 120.0/255.0, blue: 190.0/255.0, alpha: 1.0))],
// startPoint: .leading,
// endPoint: .trailing
// )
// )
//
// .frame(width: self.uiscreen.width * 0.9,
// height: self.uiscreen.height * 0.15,
// alignment: .topLeading)
// .cornerRadius(CGFloat(7))
// .offset(x: self.uiscreen.width * 0.0025, y: self.uiscreen.height * 0.08)
ZStack {
Image("logo", bundle: Bundle(identifier:"framework.warp.ly.warplySDKFramework"))
.resizable()
.frame(width: self.uiscreen.height * 0.04, height: self.uiscreen.height * 0.04, alignment: .topLeading)
.cornerRadius(CGFloat(self.uiscreen.height * 0.02))
.offset(x: -self.uiscreen.width / 2 + self.uiscreen.width * 0.14, y: -self.uiscreen.height * 0.07)
Image("logo", bundle: Bundle(identifier:"framework.warp.ly.warplySDKFramework"))
.resizable()
.frame(width: self.uiscreen.width * 0.24, height: self.uiscreen.height * 0.038, alignment: .topLeading)
.cornerRadius(CGFloat(self.uiscreen.height * 0.02))
.offset(x: self.uiscreen.width / 2 - self.uiscreen.width * 0.2, y: -self.uiscreen.height * 0.07)
}
Text("Χριστίνα Γεωργίου")
.frame( width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.04, alignment: .leading)
.offset(y: -self.uiscreen.height * 0.03)
.foregroundColor(.white)
}
Text("Ενεργά κουπόνια")
.frame(width: self.uiscreen.width * 0.9, alignment: .leading)
// .offset(x: -self.uiscreen.width / 4 + self.uiscreen.width * 0.0025)
}
.frame(width:self.uiscreen.width, height:self.uiscreen.height )
}
}
struct ProfileView_Previews: PreviewProvider {
static var previews: some View {
ProfileView()
}
}