Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Add UIHostingView #981

Merged
merged 1 commit into from
Nov 3, 2023
Merged

Add UIHostingView #981

merged 1 commit into from
Nov 3, 2023

Conversation

gordonbrander
Copy link
Collaborator

@gordonbrander gordonbrander commented Nov 2, 2023

...a helper view that makes it easier to embed UIHostingControllers in a parent view. Pass a parent controller into the initalizer, along with the UIHostingController. It will add the UIHostingController to the parent controller, and remove the UIHostingController from the parent controller when the UIView is deinitialized.

This should make it easier for us to embed SwiftUI views in the block editor.

Part of epic #214.

...a helper view that makes it easier to embed UIHostingControllers in a
parent view. Pass a parent controller into the initalizer, along with
the UIHostingController. It will add the UIHostingController to the
parent controller, and remove the UIHostingController from the parent
controller when the UIView is deinitialized.
@gordonbrander gordonbrander mentioned this pull request Nov 2, 2023
12 tasks
Copy link
Collaborator

@bfollington bfollington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM!

@bfollington bfollington merged commit 35e474f into main Nov 3, 2023
2 checks passed
gordonbrander added a commit that referenced this pull request Nov 14, 2023
Fixes #983

Replaces UIKit transcludes with SwiftUI transcludes using UIHostingView
from #981.

The transclude callbacks are not yet hooked up to anything. Saving this
for a future PR where we integrate the block editor with real data and
services.

Progress toward #214.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants