From 48299e5b9774fb1df3097f0073c6d4baf05de40d Mon Sep 17 00:00:00 2001 From: Michel Fortin Date: Tue, 9 Jan 2024 20:10:26 -0500 Subject: [PATCH] Adding `fittingSize` on UIView to mirror NSView's method. --- Sources/MFXUI/UX.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Sources/MFXUI/UX.swift b/Sources/MFXUI/UX.swift index ae6f1ff..430faf3 100644 --- a/Sources/MFXUI/UX.swift +++ b/Sources/MFXUI/UX.swift @@ -281,4 +281,11 @@ extension UXApplication { } +extension UXView { + + public var fittingSize: CGSize { + sizeThatFits(CGSize(width: 99999999, height: 99999999)) + } +} + #endif