summaryrefslogtreecommitdiffhomepage
path: root/ios/MullvadVPN/UI appearance/UIEdgeInsets+Extensions.swift
blob: 343543b9e7a6582972741d8f0397f23db78e8a1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//
//  UIEdgeInsets+Extensions.swift
//  MullvadVPN
//
//  Created by Marco Nikic on 2023-09-20.
//  Copyright © 2023 Mullvad VPN AB. All rights reserved.
//

import Foundation
import UIKit

extension UIEdgeInsets {
    /// Returns directional edge insets mapping left edge to leading and right edge to trailing.
    var toDirectionalInsets: NSDirectionalEdgeInsets {
        NSDirectionalEdgeInsets(
            top: top,
            leading: left,
            bottom: bottom,
            trailing: right
        )
    }
}