forked from arthurhammer/FrameGrabber
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStyle.swift
More file actions
34 lines (30 loc) · 1.09 KB
/
Style.swift
File metadata and controls
34 lines (30 loc) · 1.09 KB
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
33
34
import UIKit
extension UIColor {
static let accent = UIColor(named: "accent")!
static let secondaryAccent = UIColor(named: "secondaryAccent")!
static let cellSelection = UIColor(named: "cellSelection")!
static let editorBackground = UIColor(named: "editorBackground")!
static let editorBars = UIColor(named: "editorBars")!
static let videoCellGradient = [UIColor.black.withAlphaComponent(0), UIColor.black.withAlphaComponent(0.4)]
static let labelInverted = UIColor(named: "labelInverted")!
}
struct Style {
static func configureAppearance(for window: UIWindow? = nil) {
window?.tintColor = .accent
UISwitch.appearance().onTintColor = .accent
}
}
extension UIView {
func configureWithDefaultShadow() {
layer.shadowColor = UIColor.black.cgColor
layer.shadowOpacity = 0.12
layer.shadowRadius = 14
layer.shadowOffset = .zero
}
func configureWithBarShadow() {
layer.shadowColor = UIColor.black.cgColor
layer.shadowOpacity = 0.03
layer.shadowRadius = 5
layer.shadowOffset = .zero
}
}