Merge pull request #7 from 0xLeif/develop

1.2.0
This commit is contained in:
Zach Eriksen 2021-07-26 17:52:14 -05:00 committed by GitHub
commit 7712d2eb78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -6,10 +6,10 @@ import PackageDescription
let package = Package(
name: "ObjectUI",
platforms: [
.iOS(.v13),
.macOS(.v10_15),
.watchOS(.v6),
.tvOS(.v13)
.iOS(.v14),
.macOS(.v11),
.watchOS(.v7),
.tvOS(.v14)
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.

View File

@ -8,7 +8,7 @@
import SwiftUI
public struct ObjectView<Content>: View where Content: View {
@ObservedObject private var object: Object
@StateObject private var object: Object = Object()
private var content: (Object) -> Content
@ -16,8 +16,8 @@ public struct ObjectView<Content>: View where Content: View {
data: Any? = nil,
content: @escaping (Object) -> Content
) {
self.object = Object(data)
self.content = content
self.object.consume(Object(data))
}
public var body: some View {