blob: c36a3813ee932b45c795e6aa707f3a538d80dc54 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
//
// CGSize+Helpers.swift
// MullvadVPN
//
// Created by Mojgan on 2024-10-10.
// Copyright © 2025 Mullvad VPN AB. All rights reserved.
//
import UIKit
extension CGSize {
// Function to deduct insets from CGSize
func deducting(insets: NSDirectionalEdgeInsets) -> CGSize {
let newWidth = width - (insets.leading + insets.trailing)
let newHeight = height - (insets.top + insets.bottom)
return CGSize(width: newWidth, height: newHeight)
}
}
|