summaryrefslogtreecommitdiffhomepage
path: root/ios/MullvadVPN/Extensions/UITableViewCell+Disable.swift
blob: bca997b62f25b1b920f47ac25b84322a43a02d13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//
//  UITableViewCell+Disable.swift
//  MullvadVPN
//
//  Created by Jon Petersson on 2024-01-05.
//  Copyright © 2025 Mullvad VPN AB. All rights reserved.
//

import UIKit

extension UITableViewCell {
    func setDisabled(_ disabled: Bool) {
        isUserInteractionEnabled = !disabled
        contentView.alpha = disabled ? 0.8 : 1
    }
}