summaryrefslogtreecommitdiffhomepage
path: root/ios/MullvadVPN/TranslucentButtonBlurView.swift
blob: 5b86073ed98e9bf6a0b4a0e5f9eab748aabcb426 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//
//  AppButton.swift
//  MullvadVPN
//
//  Created by pronebird on 20/03/2019.
//  Copyright © 2019 Amagicom AB. All rights reserved.
//

import UIKit

private let kButtonCornerRadius = CGFloat(4)

@IBDesignable class TranslucentButtonBlurView: UIVisualEffectView {
    
    override init(effect: UIVisualEffect?) {
        super.init(effect: effect)
        
        setup()
    }
    
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        
        setup()
    }
    
    private func setup() {
        layer.cornerRadius = kButtonCornerRadius
        layer.masksToBounds = true
    }
    
}