Skip to content

Instantly share code, notes, and snippets.

Created May 11, 2020 23:24
  • Star 11 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Let’s recreate the iPhone lock screen using SwiftUI and Swift Playgrounds on iPad
import SwiftUI
import PlaygroundSupport
struct Screen: View {
var body: some View {
ScrollView {
VStack {
Text("5:45").font(.system(size: 64, weight: .thin))
Text("Monday, May 11").font(.system(size: 24))
}.padding(.vertical, 32)
VStack {
VStack(alignment: .leading) {
HStack {
Rectangle().frame(width: 16, height: 16).foregroundColor(Color(UIColor.systemFill)).cornerRadius(4)
Text("APP NAME").font(.caption)
Text("21m ago").font(.caption)
Text("Notification title").font(.headline)
Text("This is the notification body")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment