Files

36 lines
774 B
Swift

//
// RoundedView.swift
// PrivadoVPN
//
// Created by Juraldinio on 7/1/21.
// Copyright © 2021 Privado LLC. All rights reserved.
//
import Foundation
final class RoundedView: NSView {
private enum Constants {
static let cornerRadius: CGFloat = 14
}
override init(frame: NSRect) {
super.init(frame: frame)
self.translatesAutoresizingMaskIntoConstraints = false
self.wantsLayer = true
self.canDrawSubviewsIntoLayer = true
self.layer?.cornerRadius = Constants.cornerRadius
self.layer?.masksToBounds = true
self.updateLayer()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}