Skip to content

Commit

Permalink
Remove hosting view components (#26)
Browse files Browse the repository at this point in the history
* Patch

* Update
  • Loading branch information
muukii authored Oct 15, 2024
1 parent 36eaaa6 commit 3ff0e61
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 593 deletions.
83 changes: 0 additions & 83 deletions CompositionKit-Demo/Book.HostingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,89 +8,6 @@ import UIKit
@MainActor
extension Book {

static var hostingView: some BookView {

BookNavigationLink(title: "HostingView") {

BookPreview(expandsWidth: true, maxHeight: 300, minHeight: 300) {

let view = HostingView { _ in
BookLozenge()
}

view.backgroundColor = .yellow

return CompositionKit.AnyView { _ in

ZStackBlock {

view

}
}

}

BookPreview(expandsWidth: true, maxHeight: 300, minHeight: 300) {

HostingView { _ in
Text("Hello, HostingView")
.padding()
}

}

BookPreview(expandsWidth: true, maxHeight: 300, minHeight: 300) {

AnyView { _ in
HStackBlock(spacing: 2) {
HostingView { _ in
InteractiveView()
}&>.do {
$0.backgroundColor = .lightGray
}
HostingView { _ in
InteractiveView()
}&>.do {
$0.backgroundColor = .lightGray
}
HostingView { _ in
InteractiveView()
}&>.do {
$0.backgroundColor = .lightGray
}
}
}

}

BookPreview(expandsWidth: true, maxHeight: 300, minHeight: 300) {

AnyView { _ in
VStackBlock(spacing: 2) {
HostingView { _ in
InteractiveView()
}&>.do {
$0.backgroundColor = .lightGray
}
HostingView { _ in
InteractiveView()
}&>.do {
$0.backgroundColor = .lightGray
}
HostingView { _ in
InteractiveView()
}&>.do {
$0.backgroundColor = .lightGray
}
}
}

}
}

}

struct BookLozenge: View {
var body: some View {
Text("こんにちは")
Expand Down
1 change: 0 additions & 1 deletion CompositionKit-Demo/Book.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ let book = Book(title: "MyBook") {

if #available(iOS 13, *) {
Book_VGridView.body
Book.hostingView
}

Book.dynamicAnimator
Expand Down
172 changes: 0 additions & 172 deletions Sources/CompositionKit/HostingCell.swift

This file was deleted.

105 changes: 0 additions & 105 deletions Sources/CompositionKit/HostingController.swift

This file was deleted.

Loading

0 comments on commit 3ff0e61

Please sign in to comment.