diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2019-03-19 15:30:13 +0100 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2019-03-27 14:15:53 +0100 |
| commit | 1ec0e389301a11bc18426ce2bf1d81aa28792e97 (patch) | |
| tree | fa55ffdf7475abfc444813e58780724a4fc87dcc /ios/MullvadVPN/TranslucentButtonBlurView.swift | |
| parent | 89b45be8f6159cfb23071c5fd241edb1ff41921c (diff) | |
| download | mullvadvpn-1ec0e389301a11bc18426ce2bf1d81aa28792e97.tar.xz mullvadvpn-1ec0e389301a11bc18426ce2bf1d81aa28792e97.zip | |
Bootstrap iOS app
Diffstat (limited to 'ios/MullvadVPN/TranslucentButtonBlurView.swift')
| -rw-r--r-- | ios/MullvadVPN/TranslucentButtonBlurView.swift | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ios/MullvadVPN/TranslucentButtonBlurView.swift b/ios/MullvadVPN/TranslucentButtonBlurView.swift new file mode 100644 index 0000000000..5b86073ed9 --- /dev/null +++ b/ios/MullvadVPN/TranslucentButtonBlurView.swift @@ -0,0 +1,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 + } + +} |
