Skip to content

Commit b44fc9e

Browse files
committed
Fix DisplayList update issue
1 parent da2fffb commit b44fc9e

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

Example/HostingExample/ViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@ class ViewController: NSViewController {
6666

6767
struct ContentView: View {
6868
var body: some View {
69-
Color(uiColor: .red)
69+
AppearanceActionModifierExample()
7070
}
7171
}

Sources/OpenSwiftUI/Integration/Hosting/UIKit/View/UIHostingView.swift

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -596,8 +596,14 @@ extension _UIHostingView: ViewRendererHost {
596596

597597
package func requestUpdate(after: Double) {
598598
// TODO
599+
requestImmediateUpdate()
599600
}
600-
601+
602+
func requestImmediateUpdate() {
603+
// FIXME
604+
setNeedsLayout()
605+
}
606+
601607
package func outputsDidChange(outputs: ViewGraph.Outputs) {
602608
// TODO
603609
}
@@ -609,11 +615,7 @@ extension _UIHostingView: ViewRendererHost {
609615
package func rootTransform() -> ViewTransform {
610616
preconditionFailure("TODO")
611617
}
612-
613-
public func graphDidChange() {
614-
// TODO
615-
}
616-
618+
617619
public func preferencesDidChange() {
618620
// TODO
619621
}

0 commit comments

Comments
 (0)