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

@@ -67,6 +67,6 @@ struct VideoListView : View {
}
}
}
}.listStyle(.grouped)
}.listStyle(GroupedListStyle())
}
}

View File

@@ -8,24 +8,24 @@
import SwiftUI
import Combine
final class UserData: BindableObject {
let willChange = PassthroughSubject<UserData, Never>()
final class UserData: ObservableObject {
let objectWillChange = PassthroughSubject<UserData, Never>()
var showFavoriteOnly = false {
didSet {
willChange.send(self)
objectWillChange.send(self)
}
}
var videos = videoList {
didSet {
willChange.send(self)
objectWillChange.send(self)
}
}
var currentVideo = videoList[0] {
didSet {
willChange.send(self)
objectWillChange.send(self)
}
}
}

View File

@@ -32,13 +32,13 @@ struct VideoRow : View {
Image(systemName: video.isFavorite ? "star.fill" : "star")
.foregroundColor(video.isFavorite ? Color.yellow : Color.gray)
.tapAction {
.onTapGesture {
self.setFavorite(video: self.video)
}
}
}
.padding([.top, .bottom], 10)
.tapAction {
.onTapGesture {
self.setCurrentVideo(video: self.video)
}
}