beltex 2018-05-19 00:49:58 -04:00 committed by Robert Payne
parent a0aaba1f38
commit dd786e32c9
1 changed files with 2 additions and 2 deletions

View File

@ -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)
}
}