Files
Attractor/App/Utilities/UIEdgeInsets+Layout.swift

25 lines
598 B
Swift
Raw Normal View History

2020-07-24 19:26:35 -07:00
//
// UIEdgeInsets+Layout.swift
// SBrowser
//
// Created by James Magahern on 7/23/20.
//
import UIKit
extension UIEdgeInsets
{
var negative: UIEdgeInsets {
get {
return UIEdgeInsets(top: -top, left: -left, bottom: -bottom, right: -right)
}
}
func subtracting(_ other: UIEdgeInsets) -> UIEdgeInsets {
return UIEdgeInsets(top: self.top - other.top,
left: self.left - other.left,
bottom: self.bottom - other.bottom,
right: self.right - other.right)
}
2020-07-24 19:26:35 -07:00
}