Remove availability checks for iOS 11.0 (#486)
This commit is contained in:
parent
7bd860cbe5
commit
a83acd096a
3 changed files with 6 additions and 20 deletions
|
|
@ -11,30 +11,18 @@ import Foundation
|
|||
extension UIView {
|
||||
// Save anchors: https://stackoverflow.com/questions/46317061/use-safe-area-layout-programmatically
|
||||
var safeTopAnchor: NSLayoutYAxisAnchor {
|
||||
if #available(iOS 11.0, *) {
|
||||
return self.safeAreaLayoutGuide.topAnchor
|
||||
}
|
||||
return topAnchor
|
||||
safeAreaLayoutGuide.topAnchor
|
||||
}
|
||||
|
||||
var safeLeftAnchor: NSLayoutXAxisAnchor {
|
||||
if #available(iOS 11.0, *) {
|
||||
return self.safeAreaLayoutGuide.leftAnchor
|
||||
}
|
||||
return leftAnchor
|
||||
safeAreaLayoutGuide.leftAnchor
|
||||
}
|
||||
|
||||
var safeRightAnchor: NSLayoutXAxisAnchor {
|
||||
if #available(iOS 11.0, *) {
|
||||
return self.safeAreaLayoutGuide.rightAnchor
|
||||
}
|
||||
return rightAnchor
|
||||
safeAreaLayoutGuide.rightAnchor
|
||||
}
|
||||
|
||||
var safeBottomAnchor: NSLayoutYAxisAnchor {
|
||||
if #available(iOS 11.0, *) {
|
||||
return self.safeAreaLayoutGuide.bottomAnchor
|
||||
}
|
||||
return bottomAnchor
|
||||
safeAreaLayoutGuide.bottomAnchor
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue