mastodon-ios/MastodonSDK/Sources/MastodonExtension/UIEdgeInsets.swift

18 lines
415 B
Swift
Raw Normal View History

2022-11-26 15:36:57 +01:00
//
// UIEdgeInsets.swift
//
//
// Created by Jed Fox on 2022-11-24.
//
import UIKit
extension UIEdgeInsets {
2022-12-23 16:27:07 +01:00
public init(horizontal: CGFloat, vertical: CGFloat) {
self.init(top: vertical, left: horizontal, bottom: vertical, right: horizontal)
}
2022-11-26 15:36:57 +01:00
public static func constant(_ offset: CGFloat) -> Self {
UIEdgeInsets(top: offset, left: offset, bottom: offset, right: offset)
}
}