Skip to content

Commit 10c8f54

Browse files
Luc DionLuc Dion
authored andcommitted
Update doc, since sizeToFit() doesn’t handle correctly margins I have decided to not document it until it is fully implemented.
1 parent 41fa00c commit 10c8f54

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

README.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,6 @@ The value specifies the width and the height of the view in pixels, creating a s
458458
* `size(of view: UIView)`
459459
Set the view’s size to match the referenced view’s size
460460

461-
* `sizeToFit()`
462-
463461

464462
###### Usage examples:
465463
```javascript
@@ -475,25 +473,6 @@ Set the view’s size to match the referenced view’s size
475473
view.pin.size(250)
476474
```
477475

478-
479-
### sizeToFit()
480-
481-
sizeToFit() is the equivalent of calling sizeThatFits() on the size of the view once PinLayout has computed the size and has applied margins.
482-
483-
###### Usage examples:
484-
```javascript
485-
label.pin.width(200).sizeToFit()
486-
```
487-
488-
###### Example:
489-
The following example layout the UILabel on the right side of the UIImageView with a margin of 10px all around and also adjust the UILabel’t height to fit the text size. Note on the result that the UILabel’s height has changed to fit its content.
490-
491-
![](Docs/pinlayout-sizeToFit.png)
492-
493-
```javascript
494-
label.pin.right(of: image, aligned: .top).right().marginHorizontal(10).sizeToFit()
495-
```
496-
497476
<br/>
498477

499478
## Margins <a name="margins"></a>

0 commit comments

Comments
 (0)