Skip to content

Commit f652ae4

Browse files
committed
swift 5.1 and Xcode 11 fixes
1 parent 18e5c99 commit f652ae4

6 files changed

+6
-6
lines changed

DesignCode/ContentView.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ struct ContentView: View {
5252
.scaleEffect(0.95)
5353
.rotationEffect(Angle(degrees: show ? 5 : 0))
5454
.animation(.spring())
55-
.tapAction {
55+
.onTapGesture {
5656
self.show.toggle()
5757
}
5858
.gesture(

DesignCode/Home.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ struct MenuView: View {
119119
.rotation3DEffect(Angle(degrees: show ? 0 : 60), axis: (x: 0, y: 10.0, z: 0))
120120
.animation(.default)
121121
.offset(x: show ? 0 : -UIScreen.main.bounds.width)
122-
.tapAction {
122+
.onTapGesture {
123123
self.show.toggle()
124124
}
125125
Spacer()

DesignCode/Settings.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct Settings: View {
3535
})
3636
Section(header: Text("Email")) {
3737
TextField("Your email: ", text: $email)
38-
.textFieldStyle(.roundedBorder)
38+
.textFieldStyle(RoundedBorderTextFieldStyle())
3939
}
4040
Button(action: { self.submit.toggle() }) {
4141
Text("Submit")

DesignCode/TabBar.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import SwiftUI
1010

1111
struct TabBar: View {
1212
var body: some View {
13-
TabbedView {
13+
TabView {
1414
Home().tabItem {
1515
Image("IconHome")
1616
Text("Home")

DesignCode/UpdateList.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import SwiftUI
1111
struct UpdateList: View {
1212

1313
var updates = updateData
14-
@ObjectBinding var store = UpdateStore(updates: updateData)
14+
@ObservedObject var store = UpdateStore(updates: updateData)
1515

1616
func addUpdate() {
1717
store.updates.append(Update(image: "Certificate1", title: "New Title", text: "New Text", date: "JUL 1"))

DesignCode/UpdateStore.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import Combine
1010
import SwiftUI
1111

12-
class UpdateStore: BindableObject {
12+
class UpdateStore: ObservableObject {
1313
var willChange = PassthroughSubject<Void, Never>()
1414

1515
var updates: [Update] {

0 commit comments

Comments
 (0)