Title bar

This commit is contained in:
James Magahern
2020-07-29 14:16:25 -07:00
parent 9f506c879f
commit f330293606
6 changed files with 101 additions and 1 deletions

View File

@@ -14,4 +14,12 @@ extension CGRect
return CGPoint(x: size.width / 2.0, y: size.height / 2.0)
}
}
public func avoiding(verticalInsets insets: UIEdgeInsets) -> CGRect {
var rect = self
rect.origin.y += insets.top
rect.size.height -= insets.top
return rect
}
}