Xcode 11 beta 6

This commit is contained in:
John Holdsworth
2019-08-20 18:54:37 +02:00
parent a36ff1b7ca
commit 7de7e1e47b
40 changed files with 114 additions and 115 deletions

View File

@@ -11,11 +11,10 @@ struct HikeBadge: View {
var name: String
var body: some View {
VStack(alignment: .center) {
// crashes in Beta 5
// Badge()
// .frame(width: 300, height: 300)
// .scaleEffect(1.0 / 3.0)
// .frame(width: 100, height: 100)
Badge()
.frame(width: 300, height: 300)
.scaleEffect(1.0 / 3.0)
.frame(width: 100, height: 100)
Text(name)
.font(.caption)
.accessibility(label: Text("Badge for \(name)."))

View File

@@ -8,18 +8,18 @@ A model object that stores app data.
import Combine
import SwiftUI
final class UserData: BindableObject {
let willChange = PassthroughSubject<UserData, Never>()
final class UserData: ObservableObject {
let objectWillChange = PassthroughSubject<UserData, Never>()
var showFavoritesOnly = false {
didSet {
willChange.send(self)
objectWillChange.send(self)
}
}
var landmarks = landmarkData {
didSet {
willChange.send(self)
objectWillChange.send(self)
}
}
}

View File

@@ -15,10 +15,10 @@ struct ProfileHost: View {
var body: some View {
VStack(alignment: .leading, spacing: 20) {
HStack {
if self.mode?.value == .active {
if self.mode?.wrappedValue == .active {
Button(action: {
self.draftProfile = self.profile
self.mode?.animation().value = .inactive
self.mode?.animation().wrappedValue = .inactive
}) {
Text("Done")
}
@@ -28,7 +28,7 @@ struct ProfileHost: View {
EditButton()
}
if self.mode?.value == .inactive {
if self.mode?.wrappedValue == .inactive {
ProfileSummary(profile: profile)
} else {
ProfileEditor(profile: $draftProfile)