-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogrammingButton.swift
More file actions
51 lines (48 loc) · 1.39 KB
/
Copy pathprogrammingButton.swift
File metadata and controls
51 lines (48 loc) · 1.39 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
//
// appButtons.swift
// Stacks Coding Challenge
//
// Created by admin on 4/10/22.
//
import SwiftUI
struct programmingButton: View {
var images:Image = Image(systemName: "laptopcomputer")
var mainText:String = "Programming"
var subText:String = "image, create, share, enjoy"
var body: some View {
ZStack {
RoundedRectangle(cornerRadius: 20)
.foregroundColor(.blue)
VStack {
HStack(alignment: .top) {
Spacer()
Image(systemName: "heart")
.foregroundColor(.blue)
.padding()
}
Spacer()
VStack {
images
.resizable()
.scaledToFit()
.frame(width:50)
.foregroundColor(.black)
Text(mainText)
.font(.title)
.fontWeight(.bold)
.foregroundColor(.black)
Text(subText)
.font(.caption)
.foregroundColor(.black)
.padding()
}
Spacer()
}
}
}
}
struct programmingButton_Previews: PreviewProvider {
static var previews: some View {
appButtons()
}
}