-
Notifications
You must be signed in to change notification settings - Fork 164
Expand file tree
/
Copy pathSideMenuItemOptions.swift
More file actions
47 lines (39 loc) · 1.26 KB
/
SideMenuItemOptions.swift
File metadata and controls
47 lines (39 loc) · 1.26 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
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// SideMenuItemOptions.swift
// InteractiveSideMenu
//
// Created by Eric Miller on 2/8/18.
// Copyright © 2018 Handsome. All rights reserved.
//
import Foundation
/**
Defines the parameters for the shadow that is shown under to content controller when the side menu is open.
*/
public struct SideMenuItemOptions {
public struct Shadow {
public var color: UIColor? = UIColor.black
public var opacity: CGFloat = 0.3
public var offset: CGSize = CGSize(width: -5, height: 5)
public var offset_reverse: CGSize = CGSize(width: 5, height: 5)
public var radius: CGFloat = 3
public init() { }
public init(color: UIColor? = UIColor.black,
opacity: CGFloat = 0.3,
offset: CGSize = CGSize(width: -5, height: 5),
radius: CGFloat = 3) {
self.color = color
self.opacity = opacity
self.offset = offset
self.radius = radius
}
}
public var shadow = Shadow()
public var cornerRadius: CGFloat = 0.0 {
willSet {
if newValue < 0 {
preconditionFailure("Invalid `cornerRadius` value: \(newValue). Must be non-negative")
}
}
}
public init() { }
}