ConstraintView+Extensions.swift
6.17 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
//
// SnapKit
//
// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#if os(iOS) || os(tvOS)
import UIKit
#else
import AppKit
#endif
public extension ConstraintView {
@available(*, deprecated, message:"Use newer snp.* syntax.")
var snp_left: ConstraintItem { return self.snp.left }
@available(*, deprecated, message:"Use newer snp.* syntax.")
var snp_top: ConstraintItem { return self.snp.top }
@available(*, deprecated, message:"Use newer snp.* syntax.")
var snp_right: ConstraintItem { return self.snp.right }
@available(*, deprecated, message:"Use newer snp.* syntax.")
var snp_bottom: ConstraintItem { return self.snp.bottom }
@available(*, deprecated, message:"Use newer snp.* syntax.")
var snp_leading: ConstraintItem { return self.snp.leading }
@available(*, deprecated, message:"Use newer snp.* syntax.")
var snp_trailing: ConstraintItem { return self.snp.trailing }
@available(*, deprecated, message:"Use newer snp.* syntax.")
var snp_width: ConstraintItem { return self.snp.width }
@available(*, deprecated, message:"Use newer snp.* syntax.")
var snp_height: ConstraintItem { return self.snp.height }
@available(*, deprecated, message:"Use newer snp.* syntax.")
var snp_centerX: ConstraintItem { return self.snp.centerX }
@available(*, deprecated, message:"Use newer snp.* syntax.")
var snp_centerY: ConstraintItem { return self.snp.centerY }
@available(*, deprecated, message:"Use newer snp.* syntax.")
var snp_baseline: ConstraintItem { return self.snp.baseline }
@available(*, deprecated, message:"Use newer snp.* syntax.")
@available(iOS 8.0, OSX 10.11, *)
var snp_lastBaseline: ConstraintItem { return self.snp.lastBaseline }
@available(iOS, deprecated, message:"Use newer snp.* syntax.")
@available(iOS 8.0, OSX 10.11, *)
var snp_firstBaseline: ConstraintItem { return self.snp.firstBaseline }
@available(iOS, deprecated, message:"Use newer snp.* syntax.")
@available(iOS 8.0, *)
var snp_leftMargin: ConstraintItem { return self.snp.leftMargin }
@available(iOS, deprecated, message:"Use newer snp.* syntax.")
@available(iOS 8.0, *)
var snp_topMargin: ConstraintItem { return self.snp.topMargin }
@available(iOS, deprecated, message:"Use newer snp.* syntax.")
@available(iOS 8.0, *)
var snp_rightMargin: ConstraintItem { return self.snp.rightMargin }
@available(iOS, deprecated, message:"Use newer snp.* syntax.")
@available(iOS 8.0, *)
var snp_bottomMargin: ConstraintItem { return self.snp.bottomMargin }
@available(iOS, deprecated, message:"Use newer snp.* syntax.")
@available(iOS 8.0, *)
var snp_leadingMargin: ConstraintItem { return self.snp.leadingMargin }
@available(iOS, deprecated, message:"Use newer snp.* syntax.")
@available(iOS 8.0, *)
var snp_trailingMargin: ConstraintItem { return self.snp.trailingMargin }
@available(iOS, deprecated, message:"Use newer snp.* syntax.")
@available(iOS 8.0, *)
var snp_centerXWithinMargins: ConstraintItem { return self.snp.centerXWithinMargins }
@available(iOS, deprecated, message:"Use newer snp.* syntax.")
@available(iOS 8.0, *)
var snp_centerYWithinMargins: ConstraintItem { return self.snp.centerYWithinMargins }
@available(*, deprecated, message:"Use newer snp.* syntax.")
var snp_edges: ConstraintItem { return self.snp.edges }
@available(*, deprecated, message:"Use newer snp.* syntax.")
var snp_size: ConstraintItem { return self.snp.size }
@available(*, deprecated, message:"Use newer snp.* syntax.")
var snp_center: ConstraintItem { return self.snp.center }
@available(iOS, deprecated, message:"Use newer snp.* syntax.")
@available(iOS 8.0, *)
var snp_margins: ConstraintItem { return self.snp.margins }
@available(iOS, deprecated, message:"Use newer snp.* syntax.")
@available(iOS 8.0, *)
var snp_centerWithinMargins: ConstraintItem { return self.snp.centerWithinMargins }
@available(*, deprecated, message:"Use newer snp.* syntax.")
func snp_prepareConstraints(_ closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] {
return self.snp.prepareConstraints(closure)
}
@available(*, deprecated, message:"Use newer snp.* syntax.")
func snp_makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) {
self.snp.makeConstraints(closure)
}
@available(*, deprecated, message:"Use newer snp.* syntax.")
func snp_remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) {
self.snp.remakeConstraints(closure)
}
@available(*, deprecated, message:"Use newer snp.* syntax.")
func snp_updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) {
self.snp.updateConstraints(closure)
}
@available(*, deprecated, message:"Use newer snp.* syntax.")
func snp_removeConstraints() {
self.snp.removeConstraints()
}
var snp: ConstraintViewDSL {
return ConstraintViewDSL(view: self)
}
}