Skip to content

Commit

Permalink
Fix missing publics and adjust test to catch
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmassicotte committed Mar 27, 2024
1 parent 5dd270d commit 0a84bcc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions Sources/NSUI/ViewControllerRepresentable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public extension NSUIViewControllerRepresentable {
func sizeThatFits(_ proposal: ProposedViewSize, nsViewController: Self.NSUIViewControllerType, context: Self.Context) -> CGSize? {
sizeThatFits(proposal, nsUIViewController: nsViewController, context: context)
}

}

#elseif canImport(UIKit)
Expand Down Expand Up @@ -89,12 +88,12 @@ public extension NSUIViewControllerRepresentable {

extension NSUIViewControllerRepresentable {
@MainActor
static func dismantleNSUIViewController(_ viewController: Self.NSUIViewControllerType, coordinator: Self.Coordinator) {
public static func dismantleNSUIViewController(_ viewController: Self.NSUIViewControllerType, coordinator: Self.Coordinator) {
}

@available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
@MainActor
func sizeThatFits(_ proposal: ProposedViewSize, nsUIViewController: Self.NSUIViewControllerType, context: Self.Context) -> CGSize? {
public func sizeThatFits(_ proposal: ProposedViewSize, nsUIViewController: Self.NSUIViewControllerType, context: Self.Context) -> CGSize? {
nil
}
}
2 changes: 1 addition & 1 deletion Tests/NSUITests/ViewControllerRepresentableTests.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import XCTest
@testable import NSUI
import NSUI

@MainActor
struct RepresentedViewController: NSUIViewControllerRepresentable {
Expand Down

0 comments on commit 0a84bcc

Please sign in to comment.