mirror of https://github.com/SnapKit/SnapKit
Update safeAreaLayoutGuide usage - now a property of UIView (#473)
* https://github.com/SnapKit/SnapKit/issues/448#issuecomment-330114911 * https://developer.apple.com/documentation/uikit/uiview/2891102-safearealayoutguide
This commit is contained in:
parent
a0aaba1f38
commit
dd786e32c9
4
docs.md
4
docs.md
|
@ -331,7 +331,7 @@ class MyViewController: UIVewController {
|
|||
```
|
||||
|
||||
|
||||
### Snap view to safe layout guide
|
||||
### Snap view to safeAreaLayoutGuide
|
||||
|
||||
Just like `topLayoutGuide` and `bottomLayoutGuide` using iPhone X's new `safeAreaLayoutGuide` is easy:
|
||||
|
||||
|
@ -347,7 +347,7 @@ class MyViewController: UIVewController {
|
|||
|
||||
self.view.addSubview(tableView)
|
||||
tableView.snp.makeConstraints { (make) -> Void in
|
||||
make.top.equalTo(self.safeAreaLayoutGuide.snp.top)
|
||||
make.top.equalTo(self.view.safeAreaLayoutGuide.snp.top)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue