26 lines
612 B
Swift
26 lines
612 B
Swift
//
|
|
// UIView+EQNExtensions.swift
|
|
// Earthquake Network
|
|
//
|
|
// Created by Andrea Busi on 23/04/21.
|
|
// Copyright © 2021 Earthquake Network. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
|
|
extension UIView {
|
|
|
|
func eqn_applyShadowAndRoundedCorners() {
|
|
// rounded corners
|
|
layer.cornerRadius = AppTheme.shared.cardCornerRadius
|
|
layer.masksToBounds = false
|
|
|
|
// apply a shadow to the current view
|
|
layer.shadowColor = UIColor.black.cgColor
|
|
layer.shadowOpacity = 0.5
|
|
layer.shadowOffset = CGSize(width: 0, height: 2)
|
|
layer.shadowRadius = 2
|
|
}
|
|
}
|