Last active
September 8, 2020 07:20
-
-
Save oocoocococo/0ddb98e5361fc207b402303e457f009a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
VStack { | |
Text("ドッグマッチングアプリ") | |
.font(.subheadline) | |
.opacity(0.8) | |
Text("わんだー") | |
.font(.title) | |
.fontWeight(.black) | |
.foregroundColor(.pink) | |
.padding(5) | |
.shadow(color: .gray, radius: 1, x: 1, y: 1) | |
Image("Dog001") | |
.resizable() | |
.scaledToFit() | |
.frame(width: 220) | |
.padding() | |
.hiddenOnSmallDevices() // 小さいデバイスでは非表示にする | |
Button("アプリを開始する", action: {}) | |
.frame(width: UIScreen.main.bounds.width * 0.8) | |
.padding() | |
.foregroundColor(.white) | |
.background(Color.pink) | |
.cornerRadius(10) | |
.padding(.top, 40) | |
} | |
} | |
} | |
struct ContentView_Previews: PreviewProvider { | |
static var previews: some View { | |
Group { | |
view(device: "iPhone SE (1st generation)") | |
view(device: "iPhone 11 Pro") | |
} | |
} | |
static func view(device: PreviewDevice) -> some View { | |
ContentView() | |
.previewDevice(device) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment