ProfileView.swift 3.7 KB
//
//  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()
    }
}