Skip to content

Commit 173db08

Browse files
committed
Edit README
1 parent b8b87b7 commit 173db08

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ class MySuperview: UIView {
319319
}
320320
```
321321

322-
Sometimes, not all superviews are implemented as their own custom view class. In other words, some custom view- or controller classes add and layout not just sibling subviews but whole subview hierarchies. In those contexts, the enclosing custom view or view controller controls the parent-child relation of its subviews and can directly constrain subviews to their parents:
322+
Sometimes, not all superviews are implemented as their own custom view class. In other words, some custom view- or controller classes add and layout whole subview hierarchies. In those contexts, the enclosing custom view or view controller controls the parent-child relation of its subviews and can directly constrain subviews to their parents:
323323

324324
```swift
325325
class MySuperview: UIView {
@@ -334,7 +334,7 @@ class MySuperview: UIView {
334334
}
335335
```
336336

337-
If you still want to explicitly constrain a layout item to its parent, you can use the `parent` property. On a view, `parent` is its `superView`. On a layout guide, `parent` is its `owningView`, Of course, `parent` is optional, but all layout item based constrain targets can just be optional:
337+
If you still want to explicitly constrain a layout item to its parent, you can use the `parent` property. On a view, `parent` is its `superView`. On a layout guide, `parent` is its `owningView`. Of course, `parent` is optional, but all layout item based constrain targets can just be optional:
338338

339339
```swift
340340
item >> item.parent?.top.offset(10) // constrain top to parent, inset 10
@@ -355,7 +355,7 @@ class MyView: UIView {
355355
// ... other code, including call to addSubviews() ...
356356

357357
func addSubviews() {
358-
addForAutoLayout(MyContentView()) >> safeArea // constrain content to safe area
358+
addForAutoLayout(MyContentView()) >> safeArea // constrain content to safe area
359359
}
360360
}
361361
```

0 commit comments

Comments
 (0)