view Supply/AppInfo.swift @ 0:668fd7e0d121

first commit
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Tue, 05 Jan 2021 16:43:09 +0000
parents
children
line wrap: on
line source

//
//  AppInfo.swift
//  LazyBear
//
//  Created by Dennis Concepción Martín on 31/12/20.
//

import SwiftUI

struct AppInfo: View {
    var body: some View {
        HStack {
            Spacer()
            Image("launchLogo")
                .resizable()
                .frame(width: /*@START_MENU_TOKEN@*/100/*@END_MENU_TOKEN@*/, height: /*@START_MENU_TOKEN@*/100/*@END_MENU_TOKEN@*/, alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/)
            
            VStack {
                Text("Lazybear " + getVersion())
                    .fontWeight(/*@START_MENU_TOKEN@*/.bold/*@END_MENU_TOKEN@*/)
                
                Text("By Dennis Concepción")
            }
            Spacer()
        }
        .padding()
    }
    
    // Get app version
    func getVersion() -> String {
        let dictionary = Bundle.main.infoDictionary!
        let version = dictionary["CFBundleShortVersionString"] as! String
        return version
    }
}

struct AppInfo_Previews: PreviewProvider {
    static var previews: some View {
        AppInfo()
    }
}