You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -888,7 +888,7 @@ The resulting size will always respect [`minWidth`/`maxWidth`/`minHeight`/`maxHe
888
888
**Methods:**
889
889
890
890
***`sizeToFit()`**
891
-
The method adjust the view's size based on the result of the method `UIView.sizeToFit()`. Particularly useful for controls/views that have an intrinsic size (label, button, ...).
891
+
The method adjust the view's size based on it's content requirements so that it uses the most appropriate amount of space. This fit type has the same effect as calling **sizeToFit()** on a view. The resulting size come from sizeThatFits(..) being called with the current view bounds. Particularly useful for controls/views that have an intrinsic size (label, button, ...).
892
892
893
893
***`sizeToFit(: FitType)`**
894
894
The method adjust the view's size based on the result of the method `sizeThatFits(:CGSize)`.
@@ -1777,7 +1777,7 @@ PinLayout can layout **NSView**'s on macOS. All PinLayout's properties and metho
1777
1777
1778
1778
* PinLayout supports **only views that have a parent (superview) using a flipped coordinate system**, i.e. views for which the computed property `var isFlipped: Bool` returns true. In a flipped coordinate system, the origin is in the upper-left corner of the view and y-values extend downward. UIKit use this coordinate system. In a non-flipped coordinate system (default mode), the origin is in the lower-left corner of the view and positive y-values extend upward. See [Apple's documentation for more information about `NSView.isFlipped`](https://developer.apple.com/documentation/appkit/nsview/1483532-isflipped). The support of non-flipped coordinate system will be added soon.
1779
1779
1780
-
*[`sizeToFit(:FitType)`](#sizeToFit) is supported only for instances that inherits from NSControl. Support for [`sizeToFit(:FitType)`](#sizeToFit) can be added to your custom NSView subclasses, just make those views conform to the `SizeCalculable` protocol and implement the two required functions.
1780
+
*[`sizeToFit(:FitType)`](#sizeToFit) is supported only for instances that inherits from NSControl. Support for [`sizeToFit(:FitType)`](#sizeToFit) can be added to your custom NSView subclasses, just make those views conform to the `SizeCalculable` protocol and implement the required `sizeThatFits(:CGSize)` function.
1781
1781
1782
1782
*[`NSView.pin.safeArea` and ](#safeAreaInsets) property is not available, AppKit doesn't have an `UIView.safeAreaInsets` equivalent.
1783
1783
@@ -1793,7 +1793,7 @@ PinLayout can layout **NSView**'s on macOS. All PinLayout's properties and metho
1793
1793
1794
1794
PinLayout can layouts **CALayer**'s. All PinLayout's properties and methods are available, with the following exceptions:
1795
1795
1796
-
*[`sizeToFit(:FitType)`](#sizeToFit) is not supported. Support for [`sizeToFit(:FitType)`](#sizeToFit) can be added to your custom CALayer subclasses, just make those layers conform to the `SizeCalculable` protocol and implement the two required functions.
1796
+
*[`sizeToFit(:FitType)`](#sizeToFit) is not supported. Support for [`sizeToFit(:FitType)`](#sizeToFit) can be added to your custom CALayer subclasses, just make those layers conform to the `SizeCalculable` protocol and implement the required `sizeThatFits(:CGSize)` function.
1797
1797
*[`CALayer.pin.safeArea` and `CALayer.pin.readableMargins`](#safeAreaInsets) properties are not available.
1798
1798
*[`aspectRatio()`](#aspect_ratio) with no parameters
0 commit comments