Add projects

This commit is contained in:
Ivan Vorobei
2019-06-07 08:56:26 +03:00
parent f1382c2bca
commit 5b758db8cd
117 changed files with 5413 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
// Copyright © 2019 Poikile Creations. All rights reserved.
import SwiftUI
struct ClockView : View {
@State var showMilitaryTime = false
private var dateFormatter: DateFormatter = {
let formatter = DateFormatter()
formatter.timeStyle = .short
return formatter
}()
private var militaryDateFormatter: DateFormatter = {
let formatter = DateFormatter()
formatter.dateFormat = "HH:MM"
return formatter
}()
private var timeString: String {
if showMilitaryTime {
return militaryDateFormatter.string(from: Date())
} else {
return dateFormatter.string(from: Date())
}
}
var body: some View {
VStack {
Button(action: {
self.showMilitaryTime.toggle()
}) {
Text(self.timeString)
.font(.headline)
}
//
// Text("quinta hora noctis")
// .font(.subheadline)
// .italic()
// .padding(.top, 10)
}
}
}
#if DEBUG
struct Clock_Previews : PreviewProvider {
static var previews: some View {
ClockView()
}
}
#endif