(lhs: P, rhs: Expression) -> [NSLayoutConstraint] {
33 | return lhs.context.addConstraint(lhs, coefficients: rhs.coefficients, to: rhs.value)
34 | }
35 |
36 | /// Declares a property equal to another compound property.
37 | ///
38 | /// - parameter lhs: The affected property. The associated view will have
39 | /// `translatesAutoresizingMaskIntoConstraints` set to `false`.
40 | /// - parameter rhs: The other property.
41 | ///
42 | @discardableResult public func == (lhs: P, rhs: P) -> [NSLayoutConstraint] {
43 | return lhs.context.addConstraint(lhs, to: rhs)
44 | }
45 |
46 | /// Compound properties conforming to this protocol can use the `<=` and `>=`
47 | /// operators with other compound properties of the same type.
48 | public protocol RelativeCompoundInequality : Compound { }
49 |
50 | /// Declares a property less than or equal to another compound property.
51 | ///
52 | /// - parameter lhs: The affected property. The associated view will have
53 | /// `translatesAutoresizingMaskIntoConstraints` set to `false`.
54 | /// - parameter rhs: The other property.
55 | ///
56 | /// - returns: An `NSLayoutConstraint`.
57 | ///
58 | @discardableResult public func <= (lhs: P, rhs: P) -> [NSLayoutConstraint] {
59 | return lhs.context.addConstraint(lhs, to: rhs, relation: NSLayoutRelation.lessThanOrEqual)
60 | }
61 |
62 | /// Declares a property greater than or equal to another compound property.
63 | ///
64 | /// - parameter lhs: The affected property. The associated view will have
65 | /// `translatesAutoresizingMaskIntoConstraints` set to `false`.
66 | /// - parameter rhs: The other property.
67 | ///
68 | /// - returns: An `NSLayoutConstraint`.
69 | ///
70 | @discardableResult public func >= (lhs: P, rhs: P) -> [NSLayoutConstraint] {
71 | return lhs.context.addConstraint(lhs, to: rhs, relation: NSLayoutRelation.greaterThanOrEqual)
72 | }
73 |
74 | /// Declares a property less than or equal to the result of an expression.
75 | ///
76 | /// - parameter lhs: The affected property. The associated view will have
77 | /// `translatesAutoresizingMaskIntoConstraints` set to `false`.
78 | /// - parameter rhs: The other property.
79 | ///
80 | /// - returns: An `NSLayoutConstraint`.
81 | ///
82 | @discardableResult public func <= (lhs: P, rhs: Expression) -> [NSLayoutConstraint] {
83 | return lhs.context.addConstraint(lhs, coefficients: rhs.coefficients, to: rhs.value, relation: NSLayoutRelation.lessThanOrEqual)
84 | }
85 |
86 | /// Declares a property greater than or equal to the result of an expression.
87 | ///
88 | /// - parameter lhs: The affected property. The associated view will have
89 | /// `translatesAutoresizingMaskIntoConstraints` set to `false`.
90 | /// - parameter rhs: The other property.
91 | ///
92 | /// - returns: An `NSLayoutConstraint`.
93 | ///
94 | @discardableResult public func >= (lhs: P, rhs: Expression) -> [NSLayoutConstraint] {
95 | return lhs.context.addConstraint(lhs, coefficients: rhs.coefficients, to: rhs.value, relation: NSLayoutRelation.greaterThanOrEqual)
96 | }
97 |
98 | #if os(iOS) || os(tvOS)
99 |
100 | /// Declares a property equal to a layout support.
101 | ///
102 | /// - parameter lhs: The affected property. The associated view will have
103 | /// `translatesAutoresizingMaskIntoConstraints` set to `false`.
104 | /// - parameter rhs: The layout support.
105 | ///
106 | /// - returns: An `NSLayoutConstraint`.
107 | ///
108 |
109 | @discardableResult public func == (lhs: P, rhs: LayoutSupport) -> NSLayoutConstraint {
110 | return lhs.context.addConstraint(lhs, to: rhs)
111 | }
112 |
113 | /// Declares a property equal to the result of a layout support expression.
114 | ///
115 | /// - parameter lhs: The affected property. The associated view will have
116 | /// `translatesAutoresizingMaskIntoConstraints` set to `false`.
117 | /// - parameter rhs: The layout support expression.
118 | ///
119 | /// - returns: An `NSLayoutConstraint`.
120 | ///
121 |
122 | @discardableResult public func == (lhs: P, rhs: Expression) -> NSLayoutConstraint {
123 | return lhs.context.addConstraint(lhs, to: rhs.value, coefficients: rhs.coefficients[0])
124 | }
125 |
126 | /// Declares a property greater than or equal to a layout support.
127 | ///
128 | /// - parameter lhs: The affected property. The associated view will have
129 | /// `translatesAutoresizingMaskIntoConstraints` set to `false`.
130 | /// - parameter rhs: The layout support.
131 | ///
132 | /// - returns: An `NSLayoutConstraint`.
133 | ///
134 |
135 | @discardableResult public func >= (lhs: P, rhs: LayoutSupport) -> NSLayoutConstraint {
136 | return lhs.context.addConstraint(lhs, to: rhs, relation: NSLayoutRelation.greaterThanOrEqual)
137 | }
138 |
139 | /// Declares a property less than or equal to a layout support.
140 | ///
141 | /// - parameter lhs: The affected property. The associated view will have
142 | /// `translatesAutoresizingMaskIntoConstraints` set to `false`.
143 | /// - parameter rhs: The layout support.
144 | ///
145 | /// - returns: An `NSLayoutConstraint`.
146 | ///
147 |
148 | @discardableResult public func <= (lhs: P, rhs: LayoutSupport) -> NSLayoutConstraint {
149 | return lhs.context.addConstraint(lhs, to: rhs, relation: NSLayoutRelation.lessThanOrEqual)
150 | }
151 |
152 | /// Declares a property greater than or equal to the result of a layout support expression.
153 | ///
154 | /// - parameter lhs: The affected property. The associated view will have
155 | /// `translatesAutoresizingMaskIntoConstraints` set to `false`.
156 | /// - parameter rhs: The layout support.
157 | ///
158 | /// - returns: An `NSLayoutConstraint`.
159 | ///
160 |
161 | @discardableResult public func >= (lhs: P, rhs: Expression) -> NSLayoutConstraint {
162 | return lhs.context.addConstraint(lhs, to: rhs.value, coefficients: rhs.coefficients[0], relation: NSLayoutRelation.greaterThanOrEqual)
163 | }
164 |
165 | /// Declares a property less than or equal to the result of a layout support expression.
166 | ///
167 | /// - parameter lhs: The affected property. The associated view will have
168 | /// `translatesAutoresizingMaskIntoConstraints` set to `false`.
169 | /// - parameter rhs: The layout support.
170 | ///
171 | /// - returns: An `NSLayoutConstraint`.
172 | ///
173 |
174 | @discardableResult public func <= (lhs: P, rhs: Expression) -> NSLayoutConstraint {
175 | return lhs.context.addConstraint(lhs, to: rhs.value, coefficients: rhs.coefficients[0], relation: NSLayoutRelation.lessThanOrEqual)
176 | }
177 |
178 | #endif
179 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Cartography/Cartography/Constrain.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Constrain.swift
3 | // Cartography
4 | //
5 | // Created by Robert Böhnke on 30/09/14.
6 | // Copyright (c) 2014 Robert Böhnke. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | /// Updates the constraints of a single view.
12 | ///
13 | /// - parameter view: The view to layout.
14 | /// - parameter replace: The `ConstraintGroup` whose constraints should be
15 | /// replaced.
16 | /// - parameter block: A block that declares the layout for `view`.
17 | ///
18 | @discardableResult public func constrain(_ view: View, replace group: ConstraintGroup? = nil, block: (LayoutProxy) -> ()) -> ConstraintGroup {
19 | let constraintGroup = group ?? ConstraintGroup()
20 | let context = Context()
21 | block(LayoutProxy(context, view))
22 | constraintGroup.replaceConstraints(context.constraints)
23 |
24 | return constraintGroup
25 | }
26 |
27 | /// Updates the constraints of two views.
28 | ///
29 | /// - parameter view1: A view to layout.
30 | /// - parameter view2: A view to layout.
31 | /// - parameter replace: The `ConstraintGroup` whose constraints should be
32 | /// replaced.
33 | /// - parameter block: A block that declares the layout for the views.
34 | ///
35 | @discardableResult public func constrain(_ view1: View, _ view2: View, replace group: ConstraintGroup? = nil, block: (LayoutProxy, LayoutProxy) -> ()) -> ConstraintGroup {
36 | let constraintGroup = group ?? ConstraintGroup()
37 | let context = Context()
38 | block(LayoutProxy(context, view1), LayoutProxy(context, view2))
39 | constraintGroup.replaceConstraints(context.constraints)
40 |
41 | return constraintGroup
42 | }
43 |
44 | /// Updates the constraints of three views.
45 | ///
46 | /// - parameter view1: A view to layout.
47 | /// - parameter view2: A view to layout.
48 | /// - parameter view3: A view to layout.
49 | /// - parameter replace: The `ConstraintGroup` whose constraints should be
50 | /// replaced.
51 | /// - parameter block: A block that declares the layout for the views.
52 | ///
53 | @discardableResult public func constrain(_ view1: View, _ view2: View, _ view3: View, replace group: ConstraintGroup? = nil, block: (LayoutProxy, LayoutProxy, LayoutProxy) -> ()) -> ConstraintGroup {
54 | let constraintGroup = group ?? ConstraintGroup()
55 | let context = Context()
56 | block(LayoutProxy(context, view1), LayoutProxy(context, view2), LayoutProxy(context, view3))
57 | constraintGroup.replaceConstraints(context.constraints)
58 |
59 | return constraintGroup
60 | }
61 |
62 | /// Updates the constraints of four views.
63 | ///
64 | /// - parameter view1: A view to layout.
65 | /// - parameter view2: A view to layout.
66 | /// - parameter view3: A view to layout.
67 | /// - parameter view4: A view to layout.
68 | /// - parameter replace: The `ConstraintGroup` whose constraints should be
69 | /// replaced.
70 | /// - parameter block: A block that declares the layout for the views.
71 | ///
72 | @discardableResult public func constrain(_ view1: View, _ view2: View, _ view3: View, _ view4: View, replace group: ConstraintGroup? = nil, block: (LayoutProxy, LayoutProxy, LayoutProxy, LayoutProxy) -> ()) -> ConstraintGroup {
73 | let constraintGroup = group ?? ConstraintGroup()
74 | let context = Context()
75 | block(LayoutProxy(context, view1), LayoutProxy(context, view2), LayoutProxy(context, view3), LayoutProxy(context, view4))
76 | constraintGroup.replaceConstraints(context.constraints)
77 |
78 | return constraintGroup
79 | }
80 |
81 | /// Updates the constraints of five views.
82 | ///
83 | /// - parameter view1: A view to layout.
84 | /// - parameter view2: A view to layout.
85 | /// - parameter view3: A view to layout.
86 | /// - parameter view4: A view to layout.
87 | /// - parameter view5: A view to layout.
88 | /// - parameter replace: The `ConstraintGroup` whose constraints should be
89 | /// replaced.
90 | /// - parameter block: A block that declares the layout for the views.
91 | ///
92 | @discardableResult public func constrain(_ view1: View, _ view2: View, _ view3: View, _ view4: View, _ view5: View, replace group: ConstraintGroup? = nil, block: (LayoutProxy, LayoutProxy, LayoutProxy, LayoutProxy, LayoutProxy) -> ()) -> ConstraintGroup {
93 | let constraintGroup = group ?? ConstraintGroup()
94 | let context = Context()
95 | block(LayoutProxy(context, view1), LayoutProxy(context, view2), LayoutProxy(context, view3), LayoutProxy(context, view4), LayoutProxy(context, view5))
96 | constraintGroup.replaceConstraints(context.constraints)
97 |
98 | return constraintGroup
99 | }
100 |
101 | /// Updates the constraints of an array of views.
102 | ///
103 | /// - parameter views: The views to layout.
104 | /// - parameter replace: The `ConstraintGroup` whose constraints should be
105 | /// replaced.
106 | /// - parameter block: A block that declares the layout for `views`.
107 | ///
108 | @discardableResult public func constrain(_ views: [View], replace group: ConstraintGroup? = nil, block: ([LayoutProxy]) -> ()) -> ConstraintGroup {
109 | let constraintGroup = group ?? ConstraintGroup()
110 | let context = Context()
111 | block(views.map({ LayoutProxy(context, $0) }))
112 | constraintGroup.replaceConstraints(context.constraints)
113 |
114 | return constraintGroup
115 | }
116 |
117 | /// Updates the constraints of a dictionary of views.
118 | ///
119 | /// - parameter views: The views to layout.
120 | /// - parameter replace: The `ConstraintGroup` whose constraints should be
121 | /// replaced.
122 | /// - parameter block: A block that declares the layout for `views`.
123 | ///
124 | @discardableResult public func constrain(_ views: [T: View], replace group: ConstraintGroup? = nil, block: (([T : LayoutProxy]) -> ())) -> ConstraintGroup {
125 | let constraintGroup = group ?? ConstraintGroup()
126 | let context = Context()
127 | let proxies = views.map { ($0, LayoutProxy(context, $1)) }
128 | var dict = [T:LayoutProxy]()
129 |
130 | proxies.forEach {
131 | dict[$0.0] = $0.1
132 | }
133 |
134 | block(dict)
135 | constraintGroup.replaceConstraints(context.constraints)
136 |
137 | return constraintGroup
138 | }
139 |
140 | /// Removes all constraints for a group.
141 | ///
142 | /// - parameter clear: The `ConstraintGroup` whose constraints should be removed.
143 | ///
144 | public func constrain(clear group: ConstraintGroup) {
145 | group.replaceConstraints([])
146 | }
147 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Cartography/Cartography/Constraint.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Constraint.swift
3 | // Cartography
4 | //
5 | // Created by Robert Böhnke on 06/10/14.
6 | // Copyright (c) 2014 Robert Böhnke. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 | import UIKit
11 | #else
12 | import AppKit
13 | #endif
14 |
15 | internal class Constraint {
16 | // Set to weak to avoid a retain cycle on the associated view.
17 | weak var view: View?
18 | let layoutConstraint: NSLayoutConstraint
19 |
20 | func install() {
21 | view?.addConstraint(layoutConstraint)
22 | }
23 |
24 | func uninstall() {
25 | view?.removeConstraint(layoutConstraint)
26 | }
27 |
28 | init(view: View, layoutConstraint: NSLayoutConstraint) {
29 | self.view = view
30 | self.layoutConstraint = layoutConstraint
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Cartography/Cartography/ConstraintGroup.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ConstraintGroup.swift
3 | // Cartography
4 | //
5 | // Created by Robert Böhnke on 22/01/15.
6 | // Copyright (c) 2015 Robert Böhnke. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public class ConstraintGroup {
12 | private var constraints: [Constraint] = []
13 |
14 | @available(OSX, introduced: 10.10)
15 | @available(iOS, introduced: 8.0)
16 | public var active: Bool {
17 | get {
18 | return constraints
19 | .map { $0.layoutConstraint.isActive }
20 | .reduce(true) { $0 && $1 }
21 | }
22 | set {
23 | for constraint in constraints {
24 | constraint.layoutConstraint.isActive = newValue
25 | }
26 | }
27 | }
28 |
29 | public init() {
30 |
31 | }
32 |
33 | internal func replaceConstraints(_ constraints: [Constraint]) {
34 | for constraint in self.constraints {
35 | constraint.uninstall()
36 | }
37 |
38 | self.constraints = constraints
39 |
40 | for constraint in self.constraints {
41 | constraint.install()
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Cartography/Cartography/Context.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Context.swift
3 | // Cartography
4 | //
5 | // Created by Robert Böhnke on 06/10/14.
6 | // Copyright (c) 2014 Robert Böhnke. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 | import UIKit
11 | #else
12 | import AppKit
13 | #endif
14 |
15 | public class Context {
16 | internal var constraints: [Constraint] = []
17 |
18 | #if os(iOS) || os(tvOS)
19 |
20 | internal func addConstraint(_ from: Property, to: LayoutSupport, coefficients: Coefficients = Coefficients(), relation: NSLayoutRelation = .equal) -> NSLayoutConstraint {
21 | from.view.car_translatesAutoresizingMaskIntoConstraints = false
22 |
23 | let layoutConstraint = NSLayoutConstraint(item: from.view,
24 | attribute: from.attribute,
25 | relatedBy: relation,
26 | toItem: to.layoutGuide,
27 | attribute: to.attribute,
28 | multiplier: CGFloat(coefficients.multiplier),
29 | constant: CGFloat(coefficients.constant))
30 |
31 | var view = from.view
32 | while let superview = view.superview {
33 | view = superview
34 | }
35 | constraints.append(Constraint(view: view, layoutConstraint: layoutConstraint))
36 |
37 | return layoutConstraint
38 | }
39 |
40 | #endif
41 |
42 | internal func addConstraint(_ from: Property, to: Property? = nil, coefficients: Coefficients = Coefficients(), relation: NSLayoutRelation = .equal) -> NSLayoutConstraint {
43 |
44 | from.view.car_translatesAutoresizingMaskIntoConstraints = false
45 |
46 | let layoutConstraint = NSLayoutConstraint(item: from.view,
47 | attribute: from.attribute,
48 | relatedBy: relation,
49 | toItem: to?.view,
50 | attribute: to?.attribute ?? .notAnAttribute,
51 | multiplier: CGFloat(coefficients.multiplier),
52 | constant: CGFloat(coefficients.constant))
53 |
54 | if let to = to {
55 | if let common = closestCommonAncestor(from.view, b: to.view ) {
56 | constraints.append(Constraint(view: common, layoutConstraint: layoutConstraint))
57 | } else {
58 | fatalError("No common superview found between \(from.view) and \(to.view)")
59 | }
60 | } else {
61 | constraints.append(Constraint(view: from.view, layoutConstraint: layoutConstraint))
62 | }
63 |
64 | return layoutConstraint
65 | }
66 |
67 | internal func addConstraint(_ from: Compound, coefficients: [Coefficients]? = nil, to: Compound? = nil, relation: NSLayoutRelation = NSLayoutRelation.equal) -> [NSLayoutConstraint] {
68 | var results: [NSLayoutConstraint] = []
69 |
70 | for i in 0.. NSLayoutConstraint) -> [NSLayoutConstraint] {
18 | rest.last?.view.car_translatesAutoresizingMaskIntoConstraints = false
19 |
20 | return rest.reduce(([], first)) { (acc, current) -> Accumulator in
21 | let (constraints, previous) = acc
22 |
23 | return (constraints + [ combine(previous, current) ], current)
24 | }.0
25 | }
26 |
27 | /// Distributes multiple views horizontally.
28 | ///
29 | /// All views passed to this function will have
30 | /// their `translatesAutoresizingMaskIntoConstraints` properties set to `false`.
31 | ///
32 | /// - parameter amount: The distance between the views.
33 | /// - parameter views: The views to distribute.
34 | ///
35 | /// - returns: An array of `NSLayoutConstraint` instances.
36 | ///
37 | @discardableResult public func distribute(by amount: CGFloat, horizontally first: LayoutProxy, _ rest: LayoutProxy...) -> [NSLayoutConstraint] {
38 | return reduce(first, rest: rest) { $0.trailing == $1.leading - amount }
39 | }
40 |
41 | /// Distributes multiple views horizontally from left to right.
42 | ///
43 | /// All views passed to this function will have
44 | /// their `translatesAutoresizingMaskIntoConstraints` properties set to `false`.
45 | ///
46 | /// - parameter amount: The distance between the views.
47 | /// - parameter views: The views to distribute.
48 | ///
49 | /// - returns: An array of `NSLayoutConstraint` instances.
50 | ///
51 | @discardableResult public func distribute(by amount: CGFloat, leftToRight first: LayoutProxy, _ rest: LayoutProxy...) -> [NSLayoutConstraint] {
52 | return reduce(first, rest: rest) { $0.right == $1.left - amount }
53 | }
54 |
55 | /// Distributes multiple views vertically.
56 | ///
57 | /// All views passed to this function will have
58 | /// their `translatesAutoresizingMaskIntoConstraints` properties set to `false`.
59 | ///
60 | /// - parameter amount: The distance between the views.
61 | /// - parameter views: The views to distribute.
62 | ///
63 | /// - returns: An array of `NSLayoutConstraint` instances.
64 | ///
65 | @discardableResult public func distribute(by amount: CGFloat, vertically first: LayoutProxy, _ rest: LayoutProxy...) -> [NSLayoutConstraint] {
66 | return reduce(first, rest: rest) { $0.bottom == $1.top - amount }
67 | }
68 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Cartography/Cartography/Edge.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Edge.swift
3 | // Cartography
4 | //
5 | // Created by Robert Böhnke on 17/06/14.
6 | // Copyright (c) 2014 Robert Böhnke. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 | import UIKit
11 | #else
12 | import AppKit
13 | #endif
14 |
15 | public struct Edge : Property, RelativeEquality, RelativeInequality, Addition, Multiplication {
16 | public let attribute: NSLayoutAttribute
17 | public let context: Context
18 | public let view: View
19 |
20 | internal init(_ context: Context, _ view: View, _ attribute: NSLayoutAttribute) {
21 | self.attribute = attribute
22 | self.context = context
23 | self.view = view
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Cartography/Cartography/Edges.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Edges.swift
3 | // Cartography
4 | //
5 | // Created by Robert Böhnke on 19/06/14.
6 | // Copyright (c) 2014 Robert Böhnke. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 | import UIKit
11 | #else
12 | import AppKit
13 | #endif
14 |
15 | public struct Edges: Compound, RelativeCompoundEquality, RelativeCompoundInequality {
16 | public let context: Context
17 | public let properties: [Property]
18 |
19 | internal init(_ context: Context, _ properties: [Property]) {
20 | self.context = context
21 | self.properties = properties
22 | }
23 | }
24 |
25 | /// Insets all edges.
26 | ///
27 | /// - parameter edges: The edges to inset.
28 | /// - parameter all: The amount by which to inset all edges, in points.
29 | ///
30 | /// - returns: A new expression with the inset edges.
31 | ///
32 | public func inset(_ edges: Edges, _ all: CGFloat) -> Expression {
33 | return inset(edges, all, all, all, all)
34 | }
35 |
36 | /// Insets the horizontal and vertical edges.
37 | ///
38 | /// - parameter edges: The edges to inset.
39 | /// - parameter horizontal: The amount by which to inset the horizontal edges, in
40 | /// points.
41 | /// - parameter vertical: The amount by which to inset the vertical edges, in
42 | /// points.
43 | ///
44 | /// - returns: A new expression with the inset edges.
45 | ///
46 | public func inset(_ edges: Edges, _ horizontal: CGFloat, _ vertical: CGFloat) -> Expression {
47 | return inset(edges, vertical, horizontal, vertical, horizontal)
48 | }
49 |
50 | /// Insets edges individually.
51 | ///
52 | /// - parameter edges: The edges to inset.
53 | /// - parameter top: The amount by which to inset the top edge, in points.
54 | /// - parameter leading: The amount by which to inset the leading edge, in points.
55 | /// - parameter bottom: The amount by which to inset the bottom edge, in points.
56 | /// - parameter trailing: The amount by which to inset the trailing edge, in points.
57 | ///
58 | /// - returns: A new expression with the inset edges.
59 | ///
60 | public func inset(_ edges: Edges, _ top: CGFloat, _ leading: CGFloat, _ bottom: CGFloat, _ trailing: CGFloat) -> Expression {
61 | return Expression(edges, [
62 | Coefficients(1, top),
63 | Coefficients(1, leading),
64 | Coefficients(1, -bottom),
65 | Coefficients(1, -trailing)
66 | ])
67 | }
68 |
69 | #if os(iOS) || os(tvOS)
70 | /// Insets edges individually with UIEdgeInset.
71 | ///
72 | /// - parameter edges: The edges to inset.
73 | /// - parameter insets: The amounts by which to inset all edges, in points via UIEdgeInsets.
74 | ///
75 | /// - returns: A new expression with the inset edges.
76 | ///
77 | public func inset(_ edges: Edges, _ insets: UIEdgeInsets) -> Expression {
78 | return inset(edges, insets.top, insets.left, insets.bottom, insets.right)
79 | }
80 | #endif
81 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Cartography/Cartography/Expression.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Expression.swift
3 | // Cartography
4 | //
5 | // Created by Robert Böhnke on 17/06/14.
6 | // Copyright (c) 2014 Robert Böhnke. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public struct Expression {
12 | let value: T
13 | var coefficients: [Coefficients]
14 |
15 | init(_ value: T, _ coefficients: [Coefficients]) {
16 | assert(coefficients.count > 0)
17 |
18 | self.value = value
19 | self.coefficients = coefficients
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Cartography/Cartography/Extensions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Extensions.swift
3 | // Cartography
4 | //
5 | // Created by Robert Böhnke on 22/01/15.
6 | // Copyright (c) 2015 Robert Böhnke. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 | import UIKit
11 | #else
12 | import AppKit
13 | #endif
14 |
15 | internal extension Dictionary {
16 | init(_ pairs: [Element]) {
17 | self.init()
18 |
19 | for (key, value) in pairs {
20 | self[key] = value
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Cartography/Cartography/LayoutProxy.swift:
--------------------------------------------------------------------------------
1 | //
2 | // LayoutProxy.swift
3 | // Cartography
4 | //
5 | // Created by Robert Böhnke on 17/06/14.
6 | // Copyright (c) 2014 Robert Böhnke. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public struct LayoutProxy {
12 | /// The width of the view.
13 | public var width: Dimension {
14 | return Dimension(context, view, .width)
15 | }
16 |
17 | /// The height of the view.
18 | public var height: Dimension {
19 | return Dimension(context, view, .height)
20 | }
21 |
22 | /// The size of the view. This property affects both `width` and `height`.
23 | public var size: Size {
24 | return Size(context, [
25 | Dimension(context, view, .width),
26 | Dimension(context, view, .height)
27 | ])
28 | }
29 |
30 | /// The top edge of the view.
31 | public var top: Edge {
32 | return Edge(context, view, .top)
33 | }
34 |
35 | /// The right edge of the view.
36 | public var right: Edge {
37 | return Edge(context, view, .right)
38 | }
39 |
40 | /// The bottom edge of the view.
41 | public var bottom: Edge {
42 | return Edge(context, view, .bottom)
43 | }
44 |
45 | /// The left edge of the view.
46 | public var left: Edge {
47 | return Edge(context, view, .left)
48 | }
49 |
50 | /// All edges of the view. This property affects `top`, `bottom`, `leading`
51 | /// and `trailing`.
52 | public var edges: Edges {
53 | return Edges(context, [
54 | Edge(context, view, .top),
55 | Edge(context, view, .leading),
56 | Edge(context, view, .bottom),
57 | Edge(context, view, .trailing)
58 | ])
59 | }
60 |
61 | /// The leading edge of the view.
62 | public var leading: Edge {
63 | return Edge(context, view, .leading)
64 | }
65 |
66 | /// The trailing edge of the view.
67 | public var trailing: Edge {
68 | return Edge(context, view, .trailing)
69 | }
70 |
71 | /// The horizontal center of the view.
72 | public var centerX: Edge {
73 | return Edge(context, view, .centerX)
74 | }
75 |
76 | /// The vertical center of the view.
77 | public var centerY: Edge {
78 | return Edge(context, view, .centerY)
79 | }
80 |
81 | /// The center point of the view. This property affects `centerX` and
82 | /// `centerY`.
83 | public var center: Point {
84 | return Point(context, [
85 | Edge(context, view, .centerX),
86 | Edge(context, view, .centerY)
87 | ])
88 | }
89 |
90 | /// The baseline of the view.
91 | public var baseline: Edge {
92 | return Edge(context, view, .lastBaseline)
93 | }
94 |
95 | /// The last baseline of the view.
96 | public var lastBaseline: Edge {
97 | return Edge(context, view, .lastBaseline)
98 | }
99 |
100 | #if os(iOS) || os(tvOS)
101 | /// The first baseline of the view. iOS exclusive.
102 | @available(iOS, introduced: 8.0)
103 | public var firstBaseline: Edge {
104 | return Edge(context, view, .firstBaseline)
105 | }
106 |
107 | /// All edges of the view with their respective margins. This property
108 | /// affects `topMargin`, `bottomMargin`, `leadingMargin` and
109 | /// `trailingMargin`.
110 | @available(iOS, introduced: 8.0)
111 | public var edgesWithinMargins: Edges {
112 | return Edges(context, [
113 | Edge(context, view, .topMargin),
114 | Edge(context, view, .leadingMargin),
115 | Edge(context, view, .bottomMargin),
116 | Edge(context, view, .trailingMargin)
117 | ])
118 | }
119 |
120 | /// The left margin of the view. iOS exclusive.
121 | @available(iOS, introduced: 8.0)
122 | public var leftMargin: Edge {
123 | return Edge(context, view, .leftMargin)
124 | }
125 |
126 | /// The right margin of the view. iOS exclusive.
127 | @available(iOS, introduced: 8.0)
128 | public var rightMargin: Edge {
129 | return Edge(context, view, .rightMargin)
130 | }
131 |
132 | /// The top margin of the view. iOS exclusive.
133 | @available(iOS, introduced: 8.0)
134 | public var topMargin: Edge {
135 | return Edge(context, view, .topMargin)
136 | }
137 |
138 | /// The bottom margin of the view. iOS exclusive.
139 | @available(iOS, introduced: 8.0)
140 | public var bottomMargin: Edge {
141 | return Edge(context, view, .bottomMargin)
142 | }
143 |
144 | /// The leading margin of the view. iOS exclusive.
145 | @available(iOS, introduced: 8.0)
146 | public var leadingMargin: Edge {
147 | return Edge(context, view, .leadingMargin)
148 | }
149 |
150 | /// The trailing margin of the view. iOS exclusive.
151 | @available(iOS, introduced: 8.0)
152 | public var trailingMargin: Edge {
153 | return Edge(context, view, .trailingMargin)
154 | }
155 |
156 | /// The horizontal center within the margins of the view. iOS exclusive.
157 | @available(iOS, introduced: 8.0)
158 | public var centerXWithinMargins: Edge {
159 | return Edge(context, view, .centerXWithinMargins)
160 | }
161 |
162 | /// The vertical center within the margins of the view. iOS exclusive.
163 | @available(iOS, introduced: 8.0)
164 | public var centerYWithinMargins: Edge {
165 | return Edge(context, view, .centerYWithinMargins)
166 | }
167 |
168 | /// The center point within the margins of the view. This property affects
169 | /// `centerXWithinMargins` and `centerYWithinMargins`. iOS exclusive.
170 | @available(iOS, introduced: 8.0)
171 | public var centerWithinMargins: Point {
172 | return Point(context, [
173 | Edge(context, view, .centerXWithinMargins),
174 | Edge(context, view, .centerYWithinMargins)
175 | ])
176 | }
177 | #endif
178 |
179 | internal let context: Context
180 |
181 | internal let view: View
182 |
183 | /// The superview of the view, if it exists.
184 | public var superview: LayoutProxy? {
185 | if let superview = view.superview {
186 | return LayoutProxy(context, superview)
187 | } else {
188 | return nil
189 | }
190 | }
191 |
192 | init(_ context: Context, _ view: View) {
193 | self.context = context
194 | self.view = view
195 | }
196 | }
197 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Cartography/Cartography/LayoutSupport.swift:
--------------------------------------------------------------------------------
1 | //
2 | // LayoutSupport.swift
3 | // Cartography
4 | //
5 | // Created by Timothy Chilvers on 30/03/2016.
6 | // Copyright © 2016 Robert Böhnke. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | #if os(iOS) || os(tvOS)
12 | import UIKit
13 |
14 | public struct LayoutSupport {
15 | let layoutGuide : UILayoutSupport
16 | let attribute : NSLayoutAttribute
17 | }
18 |
19 | public extension UIViewController {
20 |
21 | var topLayoutGuideCartography : LayoutSupport {
22 | get {
23 | return LayoutSupport(layoutGuide: self.topLayoutGuide, attribute: .bottom)
24 | }
25 | }
26 |
27 | var bottomLayoutGuideCartography : LayoutSupport {
28 | get {
29 | return LayoutSupport(layoutGuide: self.bottomLayoutGuide, attribute: .top)
30 | }
31 | }
32 | }
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Cartography/Cartography/Point.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Point.swift
3 | // Cartography
4 | //
5 | // Created by Robert Böhnke on 18/06/14.
6 | // Copyright (c) 2014 Robert Böhnke. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 | import UIKit
11 | #else
12 | import AppKit
13 | #endif
14 |
15 | public struct Point: Compound, RelativeCompoundEquality, RelativeCompoundInequality {
16 | public let context: Context
17 | public let properties: [Property]
18 |
19 | internal init(_ context: Context, _ properties: [Property]) {
20 | self.context = context
21 | self.properties = properties
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Cartography/Cartography/Priority.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Priority.swift
3 | // Cartography
4 | //
5 | // Created by Robert Böhnke on 18/06/14.
6 | // Copyright (c) 2014 Robert Böhnke. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 | import UIKit
11 |
12 | public typealias LayoutPriority = UILayoutPriority
13 | #else
14 | import AppKit
15 |
16 | public typealias LayoutPriority = NSLayoutPriority
17 | #endif
18 |
19 | precedencegroup CarthographyPriorityPrecedence {
20 | lowerThan: ComparisonPrecedence
21 | higherThan: AssignmentPrecedence
22 | }
23 |
24 | infix operator ~: CarthographyPriorityPrecedence
25 |
26 | /// Sets the priority for a constraint.
27 | ///
28 | /// - parameter lhs: The constraint to update.
29 | /// - parameter rhs: The new priority.
30 | ///
31 | /// - returns: The same constraint with its priority updated.
32 | ///
33 | @discardableResult public func ~ (lhs: NSLayoutConstraint, rhs: LayoutPriority) -> NSLayoutConstraint {
34 | lhs.priority = rhs
35 |
36 | return lhs
37 | }
38 |
39 | /// Sets the priority for multiple constraints.
40 | ///
41 | /// - parameter lhs: An array of `NSLayoutConstraint` instances.
42 | /// - parameter rhs: The new priority.
43 | ///
44 | /// - returns: The same constraints with their priorities updated.
45 | ///
46 | @discardableResult public func ~ (lhs: [NSLayoutConstraint], rhs: LayoutPriority) -> [NSLayoutConstraint] {
47 | return lhs.map {
48 | $0 ~ rhs
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Cartography/Cartography/Property.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Property.swift
3 | // Cartography
4 | //
5 | // Created by Robert Böhnke on 17/06/14.
6 | // Copyright (c) 2014 Robert Böhnke. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 | import UIKit
11 | #else
12 | import AppKit
13 | #endif
14 |
15 | public protocol Property {
16 | var attribute: NSLayoutAttribute { get }
17 | var context: Context { get }
18 | var view: View { get }
19 | }
20 |
21 | // MARK: Equality
22 |
23 | /// Properties conforming to this protocol can use the `==` operator with
24 | /// numerical constants.
25 | public protocol NumericalEquality : Property { }
26 |
27 | /// Declares a property equal to a numerical constant.
28 | ///
29 | /// - parameter lhs: The affected property. The associated view will have
30 | /// `translatesAutoresizingMaskIntoConstraints` set to `false`.
31 | /// - parameter rhs: The numerical constant.
32 | ///
33 | /// - returns: An `NSLayoutConstraint`.
34 | ///
35 | @discardableResult public func == (lhs: NumericalEquality, rhs: CGFloat) -> NSLayoutConstraint {
36 | return lhs.context.addConstraint(lhs, coefficients: Coefficients(1, rhs))
37 | }
38 |
39 | /// Properties conforming to this protocol can use the `==` operator with other
40 | /// properties of the same type.
41 | public protocol RelativeEquality : Property { }
42 |
43 | /// Declares a property equal to a the result of an expression.
44 | ///
45 | /// - parameter lhs: The affected property. The associated view will have
46 | /// `translatesAutoresizingMaskIntoConstraints` set to `false`.
47 | /// - parameter rhs: The expression.
48 | ///
49 | /// - returns: An `NSLayoutConstraint`.
50 | ///
51 | @discardableResult public func == (lhs: P, rhs: Expression) -> NSLayoutConstraint {
52 | return lhs.context.addConstraint(lhs, to: rhs.value, coefficients: rhs.coefficients[0])
53 | }
54 |
55 | /// Declares a property equal to another property.
56 | ///
57 | /// - parameter lhs: The affected property. The associated view will have
58 | /// `translatesAutoresizingMaskIntoConstraints` set to `false`.
59 | /// - parameter rhs: The other property.
60 | ///
61 | @discardableResult public func == (lhs: P, rhs: P) -> NSLayoutConstraint {
62 | return lhs.context.addConstraint(lhs, to: rhs)
63 | }
64 |
65 | // MARK: Inequality
66 |
67 | /// Properties conforming to this protocol can use the `<=` and `>=` operators
68 | /// with numerical constants.
69 | public protocol NumericalInequality : Property { }
70 |
71 | /// Declares a property less than or equal to a numerical constant.
72 | ///
73 | /// - parameter lhs: The affected property. The associated view will have
74 | /// `translatesAutoresizingMaskIntoConstraints` set to `false`.
75 | /// - parameter rhs: The numerical constant.
76 | ///
77 | /// - returns: An `NSLayoutConstraint`.
78 | ///
79 | @discardableResult public func <= (lhs: NumericalInequality, rhs: CGFloat) -> NSLayoutConstraint {
80 | return lhs.context.addConstraint(lhs, coefficients: Coefficients(1, rhs), relation: NSLayoutRelation.lessThanOrEqual)
81 | }
82 |
83 | /// Declares a property greater than or equal to a numerical constant.
84 | ///
85 | /// - parameter lhs: The affected property. The associated view will have
86 | /// `translatesAutoresizingMaskIntoConstraints` set to `false`.
87 | /// - parameter rhs: The numerical constant.
88 | ///
89 | /// - returns: An `NSLayoutConstraint`.
90 | ///
91 | @discardableResult public func >= (lhs: NumericalInequality, rhs: CGFloat) -> NSLayoutConstraint {
92 | return lhs.context.addConstraint(lhs, coefficients: Coefficients(1, rhs), relation: NSLayoutRelation.greaterThanOrEqual)
93 | }
94 |
95 | /// Properties conforming to this protocol can use the `<=` and `>=` operators
96 | /// with other properties of the same type.
97 | public protocol RelativeInequality : Property { }
98 |
99 | /// Declares a property less than or equal to another property.
100 | ///
101 | /// - parameter lhs: The affected property. The associated view will have
102 | /// `translatesAutoresizingMaskIntoConstraints` set to `false`.
103 | /// - parameter rhs: The other property.
104 | ///
105 | /// - returns: An `NSLayoutConstraint`.
106 | ///
107 | @discardableResult public func <= (lhs: P, rhs: P) -> NSLayoutConstraint {
108 | return lhs.context.addConstraint(lhs, to: rhs, relation: NSLayoutRelation.lessThanOrEqual)
109 | }
110 |
111 | /// Declares a property greater than or equal to another property.
112 | ///
113 | /// - parameter lhs: The affected property. The associated view will have
114 | /// `translatesAutoresizingMaskIntoConstraints` set to `false`.
115 | /// - parameter rhs: The other property.
116 | ///
117 | /// - returns: An `NSLayoutConstraint`.
118 | ///
119 | @discardableResult public func >= (lhs: P, rhs: P) -> NSLayoutConstraint {
120 | return lhs.context.addConstraint(lhs, to: rhs, relation: NSLayoutRelation.greaterThanOrEqual)
121 | }
122 |
123 | /// Declares a property less than or equal to the result of an expression.
124 | ///
125 | /// - parameter lhs: The affected property. The associated view will have
126 | /// `translatesAutoresizingMaskIntoConstraints` set to `false`.
127 | /// - parameter rhs: The other property.
128 | ///
129 | /// - returns: An `NSLayoutConstraint`.
130 | ///
131 | @discardableResult public func <= (lhs: P, rhs: Expression) -> NSLayoutConstraint {
132 | return lhs.context.addConstraint(lhs, to: rhs.value, coefficients: rhs.coefficients[0], relation: NSLayoutRelation.lessThanOrEqual)
133 | }
134 |
135 | /// Declares a property greater than or equal to the result of an expression.
136 | ///
137 | /// - parameter lhs: The affected property. The associated view will have
138 | /// `translatesAutoresizingMaskIntoConstraints` set to `false`.
139 | /// - parameter rhs: The other property.
140 | ///
141 | /// - returns: An `NSLayoutConstraint`.
142 | ///
143 | @discardableResult public func >= (lhs: P, rhs: Expression) -> NSLayoutConstraint {
144 | return lhs.context.addConstraint(lhs, to: rhs.value, coefficients: rhs.coefficients[0], relation: NSLayoutRelation.greaterThanOrEqual)
145 | }
146 |
147 | // MARK: Addition
148 |
149 | public protocol Addition : Property { }
150 |
151 | public func + (c: CGFloat, rhs: P) -> Expression {
152 | return Expression(rhs, [ Coefficients(1, c) ])
153 | }
154 |
155 | public func + (lhs: P, rhs: CGFloat) -> Expression {
156 | return rhs + lhs
157 | }
158 |
159 | public func + (c: CGFloat, rhs: Expression) -> Expression
{
160 | return Expression(rhs.value, rhs.coefficients.map { $0 + c })
161 | }
162 |
163 | public func + (lhs: Expression, rhs: CGFloat) -> Expression
{
164 | return rhs + lhs
165 | }
166 |
167 | public func - (c: CGFloat, rhs: P) -> Expression {
168 | return Expression(rhs, [ Coefficients(1, -c) ])
169 | }
170 |
171 | public func - (lhs: P, rhs: CGFloat) -> Expression {
172 | return rhs - lhs
173 | }
174 |
175 | public func - (c: CGFloat, rhs: Expression) -> Expression
{
176 | return Expression(rhs.value, rhs.coefficients.map { $0 - c})
177 | }
178 |
179 | public func - (lhs: Expression, rhs: CGFloat) -> Expression
{
180 | return rhs - lhs
181 | }
182 |
183 | #if os(iOS) || os(tvOS)
184 |
185 | public func + (lhs: LayoutSupport, c : CGFloat) -> Expression {
186 | return Expression(lhs, [Coefficients(1, c)])
187 | }
188 |
189 | public func - (lhs: LayoutSupport, c : CGFloat) -> Expression {
190 | return lhs + (-c)
191 | }
192 |
193 | #endif
194 | // MARK: Multiplication
195 |
196 | public protocol Multiplication : Property { }
197 |
198 | public func * (m: CGFloat, rhs: Expression) -> Expression
{
199 | return Expression(rhs.value, rhs.coefficients.map { $0 * m })
200 | }
201 |
202 | public func * (lhs: Expression, rhs: CGFloat) -> Expression
{
203 | return rhs * lhs
204 | }
205 |
206 | public func * (m: CGFloat, rhs: P) -> Expression {
207 | return Expression(rhs, [ Coefficients(m, 0) ])
208 | }
209 |
210 | public func * (lhs: P, rhs: CGFloat) -> Expression {
211 | return rhs * lhs
212 | }
213 |
214 | public func / (lhs: Expression, rhs: CGFloat) -> Expression
{
215 | return lhs * (1 / rhs)
216 | }
217 |
218 | public func / (lhs: P, rhs: CGFloat) -> Expression {
219 | return lhs * (1 / rhs)
220 | }
221 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Cartography/Cartography/Size.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Size.swift
3 | // Cartography
4 | //
5 | // Created by Robert Böhnke on 18/06/14.
6 | // Copyright (c) 2014 Robert Böhnke. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 | import UIKit
11 | #else
12 | import AppKit
13 | #endif
14 |
15 | public struct Size : Compound, RelativeCompoundEquality, RelativeCompoundInequality {
16 | public let context: Context
17 | public let properties: [Property]
18 |
19 | internal init(_ context: Context, _ properties: [Property]) {
20 | self.context = context
21 | self.properties = properties
22 | }
23 | }
24 |
25 | // MARK: Multiplication
26 |
27 | public func * (m: CGFloat, rhs: Expression) -> Expression {
28 | return Expression(rhs.value, rhs.coefficients.map { $0 * m })
29 | }
30 |
31 | public func * (lhs: Expression, rhs: CGFloat) -> Expression {
32 | return rhs * lhs
33 | }
34 |
35 | public func * (m: CGFloat, rhs: Size) -> Expression {
36 | return Expression(rhs, [ Coefficients(m, 0), Coefficients(m, 0) ])
37 | }
38 |
39 | public func * (lhs: Size, rhs: CGFloat) -> Expression {
40 | return rhs * lhs
41 | }
42 |
43 | // MARK: Division
44 |
45 | public func / (lhs: Expression, rhs: CGFloat) -> Expression {
46 | return lhs * (1 / rhs)
47 | }
48 |
49 | public func / (lhs: Size, rhs: CGFloat) -> Expression {
50 | return lhs * (1 / rhs)
51 | }
52 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Cartography/Cartography/View.swift:
--------------------------------------------------------------------------------
1 | //
2 | // View.swift
3 | // Cartography
4 | //
5 | // Created by Robert Böhnke on 26/06/14.
6 | // Copyright (c) 2014 Robert Böhnke. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | #if os(iOS) || os(tvOS)
12 | import UIKit
13 | public typealias View = UIView
14 |
15 | extension View {
16 | public var car_translatesAutoresizingMaskIntoConstraints: Bool {
17 | get { return translatesAutoresizingMaskIntoConstraints }
18 | set { translatesAutoresizingMaskIntoConstraints = newValue }
19 | }
20 | }
21 | #else
22 | import AppKit
23 | public typealias View = NSView
24 |
25 | extension View {
26 | public var car_translatesAutoresizingMaskIntoConstraints: Bool {
27 | get { return translatesAutoresizingMaskIntoConstraints }
28 | set { translatesAutoresizingMaskIntoConstraints = newValue }
29 | }
30 | }
31 | #endif
32 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Cartography/Cartography/ViewUtils.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewUtils.swift
3 | // Cartography
4 | //
5 | // Created by Garth Snyder on 11/23/14.
6 | // Copyright (c) 2014 Robert Böhnke. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 | import UIKit
11 | #else
12 | import AppKit
13 | #endif
14 |
15 | internal func closestCommonAncestor(_ a: View, b: View) -> View? {
16 | let (aSuper, bSuper) = (a.superview, b.superview)
17 |
18 | if a === b { return a }
19 |
20 | if a === bSuper { return a }
21 |
22 | if b === aSuper { return b }
23 |
24 | if aSuper === bSuper { return aSuper }
25 |
26 | let ancestorsOfA = Set(ancestors(a))
27 |
28 | for ancestor in ancestors(b) {
29 | if ancestorsOfA.contains(ancestor) {
30 | return ancestor
31 | }
32 | }
33 |
34 | return .none
35 | }
36 |
37 | private func ancestors(_ v: View) -> AnySequence {
38 | return AnySequence { () -> AnyIterator in
39 | var view: View? = v
40 | return AnyIterator {
41 | let current = view
42 | view = view?.superview
43 | return current
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Cartography/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2014 Robert Böhnke
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
21 | This license does not apply to the contents of the images folder.
22 |
23 | ---
24 |
25 | This project uses portions of code from FLKAutoLayout,
26 | copyright (c) 2013 Florian Kugler
27 |
28 | Permission is hereby granted, free of charge, to any person obtaining a copy
29 | of this software and associated documentation files (the "Software"), to deal
30 | in the Software without restriction, including without limitation the rights
31 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32 | copies of the Software, and to permit persons to whom the Software is furnished
33 | to do so, subject to the following conditions:
34 |
35 | The above copyright notice and this permission notice shall be included in all
36 | copies or substantial portions of the Software.
37 |
38 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
39 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
40 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
41 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
42 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
43 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
44 | THE SOFTWARE.
45 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Cartography/README.md:
--------------------------------------------------------------------------------
1 | # Cartography :iphone::triangular_ruler:
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | Using Cartography, you can set up your Auto Layout constraints in declarative code and without any stringly typing!
12 |
13 | In short, it allows you to replace this:
14 |
15 |
16 |
17 | ```Swift
18 | addConstraint(NSLayoutConstraint(
19 | item: button1,
20 | attribute: .Right,
21 | relatedBy: .Equal,
22 | toItem: button2,
23 | attribute: .Left,
24 | multiplier: 1.0,
25 | constant: -12.0
26 | ))
27 | ```
28 |
29 | with this
30 |
31 | ```Swift
32 | constrain(button1, button2) { button1, button2 in
33 | button1.right == button2.left - 12
34 | }
35 | ```
36 |
37 | If you end up using Cartography in production, I'd love to hear from you. You can reach me through [Twitter] or [email].
38 |
39 | If you need Swift 2.x support, then please use `0.7.0` and below.
40 |
41 | ## Usage
42 |
43 | Call the `constrain` function with your `UIView` or `NSView` instances as well
44 | as a closure in which you declare the constraints between the different
45 | attributes of your views:
46 |
47 | ```swift
48 | constrain(view1, view2) { view1, view2 in
49 | view1.width == (view1.superview!.width - 50) * 0.5
50 | view2.width == view1.width - 50
51 | view1.height == 40
52 | view2.height == view1.height
53 | view1.centerX == view1.superview!.centerX
54 | view2.centerX == view1.centerX
55 |
56 | view1.top >= view1.superview!.top + 20
57 | view2.top == view1.bottom + 20
58 | }
59 | ```
60 |
61 |
62 |
63 | For every view on the left hand side of an equality or inequality operator,
64 | Cartography will automatically set its
65 | `translatesAutoresizingMaskIntoConstraints` property to `false`.
66 |
67 | If the view is
68 | not controlled by you–for example _if it belongs to a Apple-provided
69 | `UIViewController` class_–you should take appropriate care when declaring its
70 | constraints.
71 |
72 |
73 |
74 | ## Replacing constraints
75 |
76 | You can capture multiple constraints in a group to then replace them with new
77 | constraints at a later point.
78 |
79 | ```swift
80 | constrain(view) { view in
81 | view.width == 100
82 | view.height == 100
83 | }
84 |
85 | let group = ConstraintGroup()
86 |
87 | // Attach `view` to the top left corner of its superview
88 | constrain(view, replace: group) { view in
89 | view.top == view.superview!.top
90 | view.left == view.superview!.left
91 | }
92 |
93 | /* Later */
94 |
95 | // Move the view to the bottom right corner of its superview
96 | constrain(view, replace: group) { view in
97 | view.bottom == view.superview!.bottom
98 | view.right == view.superview!.right
99 | }
100 |
101 | UIView.animateWithDuration(0.5, animations: view.layoutIfNeeded)
102 | ```
103 |
104 | For convenience, the `constrain` functions also returns `ConstraintGroup`
105 | instances:
106 |
107 | ```swift
108 | let group = constrain(button) { button in
109 | button.width == 100
110 | button.height == 400
111 | }
112 | ```
113 |
114 | ## Supported attributes
115 |
116 |
117 | Cartography supports all built-in attributes as of iOS 8 and OS X 10.9, those are:
118 |
119 |
120 |
121 | - `width`
122 | - `height`
123 | - `top`
124 | - `right`
125 | - `bottom`
126 | - `left`
127 | - `leading`
128 | - `trailing`
129 | - `centerX`
130 | - `centerY`
131 | - `baseline`
132 |
133 | as well as the iOS specific
134 |
135 | - `firstBaseline`
136 | - `leftMargin`
137 | - `rightMargin`
138 | - `topMargin`
139 | - `bottomMargin`
140 | - `leadingMargin`
141 | - `trailingMargin`
142 | - `centerXWithinMargins`
143 | - `centerYWithinMargins`
144 | - `edgesWithinMargins`
145 |
146 | These can be further refined using the following operators: `*`, `/`, `+` and
147 | `-`.
148 |
149 | Additionally, it supports convenient compound attributes that allow you to
150 | assign multiple attributes at once:
151 |
152 | ```swift
153 | constrain(view) { view in
154 | view.size == view.superview!.size / 2
155 | view.center == view.superview!.center
156 | }
157 | ```
158 |
159 | ```swift
160 | constrain(view) { view in
161 | view.edges == inset(view.superview!.edges, 20, 20, 40, 20)
162 | }
163 | ```
164 |
165 | ### Aligning multiple view
166 |
167 | If you need to align multiple views by a common edge, you can use the `align`
168 | functions:
169 |
170 | ```swift
171 | constrain(view1, view2, view3) { view1, view2, view3 in
172 | align(top: view1, view2, view3)
173 | }
174 | ```
175 |
176 | Which is equivalent to `view1.top == view2.top; view2.top == view3.top`. Similar
177 | variants exist for `top`, `right` `bottom`, `left`, `leading`, `trailing`,
178 | `centerX`, `centerY` and `baseline`.
179 |
180 | ### Distributing views evenly
181 |
182 | For distributing multiple views, either horizontally or vertically, you can use
183 | the `distribute` functions:
184 |
185 | ```swift
186 | constrain(view1, view2, view3) { view1, view2, view3 in
187 | distribute(by: 10, horizontally: view1, view2, view3)
188 | }
189 | ```
190 |
191 | Which is equivalent to `view1.trailing == view2.leading - 10; view2.trailing == view3.leading - 10`.
192 |
193 | ## Setting priorities
194 |
195 | You can set the priorities of your constraints using the `~` operator:
196 |
197 | ```swift
198 | constrain(view) { view in
199 | view.width >= 200 ~ 100
200 | view.height >= 200 ~ 100
201 | }
202 | ```
203 |
204 | ## Capturing constraints
205 |
206 | Since the `==`, `>=`, `<=` and `~` emit `NSLayoutConstraint` instances, you can
207 | capture their results if you need to refer to the layout constraints at a later
208 | time:
209 |
210 | ```swift
211 | var width: NSLayoutConstraint?
212 |
213 | constrain(view) { view in
214 | width = (view.width == 200 ~ 100)
215 | }
216 | ```
217 |
218 | Note that declaring compound attributes returns multiple constraints at once:
219 |
220 | ```swift
221 | var constraints: [NSLayoutConstraint]?
222 |
223 | constrain(view) { view in
224 | constraints = (view.size == view.superview!.size ~ 100)
225 | }
226 | ```
227 |
228 | ## Documentation
229 |
230 | Read the documentation [here](http://robb.github.io/Cartography/). For more information, see the [gh-pages](https://github.com/robb/Cartography/tree/gh-pages) branch.
231 |
232 | ## Support
233 |
234 | Please, don't hesitate to [file an
235 | issue](https://github.com/robb/Cartography/issues/new) if you have questions.
236 |
237 | ## About Cartography
238 |
239 | Cartography was built by [Robb Böhnke][me] and was inspired by the excellent
240 | [FLKAutoLayout] by [Florian Kugler][florian].
241 |
242 | [flkautolayout]: https://github.com/floriankugler/FLKAutoLayout
243 | [florian]: https://github.com/floriankugler
244 | [me]: http://robb.is
245 | [twitter]: https://twitter.com/dlx
246 | [email]: mailto:robb@robb.is
247 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Cartography (1.0.1)
3 | - UIColor+FlatColors (0.0.2)
4 |
5 | DEPENDENCIES:
6 | - Cartography
7 | - UIColor+FlatColors
8 |
9 | SPEC CHECKSUMS:
10 | Cartography: c1460e99395b824d9d75360b0382faeb0b33dcd7
11 | UIColor+FlatColors: 6c699df7a575281794c688c64cee6c44fd1f93b4
12 |
13 | PODFILE CHECKSUM: 8e7c96524d011a1ab9a3ff3f064c099b04f6b392
14 |
15 | COCOAPODS: 1.1.1
16 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Cartography/Cartography-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Cartography : NSObject
3 | @end
4 | @implementation PodsDummy_Cartography
5 | @end
6 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Cartography/Cartography-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Cartography/Cartography-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
6 | FOUNDATION_EXPORT double CartographyVersionNumber;
7 | FOUNDATION_EXPORT const unsigned char CartographyVersionString[];
8 |
9 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Cartography/Cartography.modulemap:
--------------------------------------------------------------------------------
1 | framework module Cartography {
2 | umbrella header "Cartography-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Cartography/Cartography.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Cartography
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public"
4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
5 | PODS_BUILD_DIR = $BUILD_DIR
6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_ROOT = ${SRCROOT}
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Cartography/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.1
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Pods-ZLSwipeableViewSwiftDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Pods-ZLSwipeableViewSwiftDemo/Pods-ZLSwipeableViewSwiftDemo-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 |
4 | ## Cartography
5 |
6 | Copyright (c) 2014 Robert Böhnke
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy
9 | of this software and associated documentation files (the "Software"), to deal
10 | in the Software without restriction, including without limitation the rights
11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | copies of the Software, and to permit persons to whom the Software is furnished
13 | to do so, subject to the following conditions:
14 |
15 | The above copyright notice and this permission notice shall be included in all
16 | copies or substantial portions of the Software.
17 |
18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 | THE SOFTWARE.
25 |
26 | This license does not apply to the contents of the images folder.
27 |
28 | ---
29 |
30 | This project uses portions of code from FLKAutoLayout,
31 | copyright (c) 2013 Florian Kugler
32 |
33 | Permission is hereby granted, free of charge, to any person obtaining a copy
34 | of this software and associated documentation files (the "Software"), to deal
35 | in the Software without restriction, including without limitation the rights
36 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
37 | copies of the Software, and to permit persons to whom the Software is furnished
38 | to do so, subject to the following conditions:
39 |
40 | The above copyright notice and this permission notice shall be included in all
41 | copies or substantial portions of the Software.
42 |
43 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
44 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
45 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
46 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
47 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
48 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
49 | THE SOFTWARE.
50 |
51 |
52 | ## UIColor+FlatColors
53 |
54 | The MIT License (MIT)
55 |
56 | Copyright (c) 2014 Giovanni Lodi
57 |
58 | Permission is hereby granted, free of charge, to any person obtaining a copy of
59 | this software and associated documentation files (the "Software"), to deal in
60 | the Software without restriction, including without limitation the rights to
61 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
62 | the Software, and to permit persons to whom the Software is furnished to do so,
63 | subject to the following conditions:
64 |
65 | The above copyright notice and this permission notice shall be included in all
66 | copies or substantial portions of the Software.
67 |
68 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
69 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
70 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
71 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
72 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
73 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
74 |
75 | Generated by CocoaPods - https://cocoapods.org
76 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Pods-ZLSwipeableViewSwiftDemo/Pods-ZLSwipeableViewSwiftDemo-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 | Copyright (c) 2014 Robert Böhnke <robb@robb.is>
18 |
19 | Permission is hereby granted, free of charge, to any person obtaining a copy
20 | of this software and associated documentation files (the "Software"), to deal
21 | in the Software without restriction, including without limitation the rights
22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23 | copies of the Software, and to permit persons to whom the Software is furnished
24 | to do so, subject to the following conditions:
25 |
26 | The above copyright notice and this permission notice shall be included in all
27 | copies or substantial portions of the Software.
28 |
29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
35 | THE SOFTWARE.
36 |
37 | This license does not apply to the contents of the images folder.
38 |
39 | ---
40 |
41 | This project uses portions of code from FLKAutoLayout,
42 | copyright (c) 2013 Florian Kugler <mail@floriankugler.de>
43 |
44 | Permission is hereby granted, free of charge, to any person obtaining a copy
45 | of this software and associated documentation files (the "Software"), to deal
46 | in the Software without restriction, including without limitation the rights
47 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
48 | copies of the Software, and to permit persons to whom the Software is furnished
49 | to do so, subject to the following conditions:
50 |
51 | The above copyright notice and this permission notice shall be included in all
52 | copies or substantial portions of the Software.
53 |
54 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
55 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
56 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
57 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
58 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
59 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
60 | THE SOFTWARE.
61 |
62 | License
63 | MIT
64 | Title
65 | Cartography
66 | Type
67 | PSGroupSpecifier
68 |
69 |
70 | FooterText
71 | The MIT License (MIT)
72 |
73 | Copyright (c) 2014 Giovanni Lodi
74 |
75 | Permission is hereby granted, free of charge, to any person obtaining a copy of
76 | this software and associated documentation files (the "Software"), to deal in
77 | the Software without restriction, including without limitation the rights to
78 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
79 | the Software, and to permit persons to whom the Software is furnished to do so,
80 | subject to the following conditions:
81 |
82 | The above copyright notice and this permission notice shall be included in all
83 | copies or substantial portions of the Software.
84 |
85 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
86 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
87 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
88 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
89 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
90 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
91 |
92 | License
93 | MIT
94 | Title
95 | UIColor+FlatColors
96 | Type
97 | PSGroupSpecifier
98 |
99 |
100 | FooterText
101 | Generated by CocoaPods - https://cocoapods.org
102 | Title
103 |
104 | Type
105 | PSGroupSpecifier
106 |
107 |
108 | StringsTable
109 | Acknowledgements
110 | Title
111 | Acknowledgements
112 |
113 |
114 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Pods-ZLSwipeableViewSwiftDemo/Pods-ZLSwipeableViewSwiftDemo-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_ZLSwipeableViewSwiftDemo : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_ZLSwipeableViewSwiftDemo
5 | @end
6 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Pods-ZLSwipeableViewSwiftDemo/Pods-ZLSwipeableViewSwiftDemo-frameworks.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 |
4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
6 |
7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
8 |
9 | install_framework()
10 | {
11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
12 | local source="${BUILT_PRODUCTS_DIR}/$1"
13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
15 | elif [ -r "$1" ]; then
16 | local source="$1"
17 | fi
18 |
19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
20 |
21 | if [ -L "${source}" ]; then
22 | echo "Symlinked..."
23 | source="$(readlink "${source}")"
24 | fi
25 |
26 | # use filter instead of exclude so missing patterns dont' throw errors
27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
29 |
30 | local basename
31 | basename="$(basename -s .framework "$1")"
32 | binary="${destination}/${basename}.framework/${basename}"
33 | if ! [ -r "$binary" ]; then
34 | binary="${destination}/${basename}"
35 | fi
36 |
37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device
38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
39 | strip_invalid_archs "$binary"
40 | fi
41 |
42 | # Resign the code if required by the build settings to avoid unstable apps
43 | code_sign_if_enabled "${destination}/$(basename "$1")"
44 |
45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
47 | local swift_runtime_libs
48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]})
49 | for lib in $swift_runtime_libs; do
50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
52 | code_sign_if_enabled "${destination}/${lib}"
53 | done
54 | fi
55 | }
56 |
57 | # Signs a framework with the provided identity
58 | code_sign_if_enabled() {
59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
60 | # Use the current code_sign_identitiy
61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\""
63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1"
64 | fi
65 | }
66 |
67 | # Strip invalid architectures
68 | strip_invalid_archs() {
69 | binary="$1"
70 | # Get architectures for current file
71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
72 | stripped=""
73 | for arch in $archs; do
74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then
75 | # Strip non-valid architectures in-place
76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1
77 | stripped="$stripped $arch"
78 | fi
79 | done
80 | if [[ "$stripped" ]]; then
81 | echo "Stripped $binary of architectures:$stripped"
82 | fi
83 | }
84 |
85 |
86 | if [[ "$CONFIGURATION" == "Debug" ]]; then
87 | install_framework "$BUILT_PRODUCTS_DIR/Cartography/Cartography.framework"
88 | install_framework "$BUILT_PRODUCTS_DIR/UIColor+FlatColors/UIColor_FlatColors.framework"
89 | fi
90 | if [[ "$CONFIGURATION" == "Release" ]]; then
91 | install_framework "$BUILT_PRODUCTS_DIR/Cartography/Cartography.framework"
92 | install_framework "$BUILT_PRODUCTS_DIR/UIColor+FlatColors/UIColor_FlatColors.framework"
93 | fi
94 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Pods-ZLSwipeableViewSwiftDemo/Pods-ZLSwipeableViewSwiftDemo-resources.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 |
4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
5 |
6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
7 | > "$RESOURCES_TO_COPY"
8 |
9 | XCASSET_FILES=()
10 |
11 | case "${TARGETED_DEVICE_FAMILY}" in
12 | 1,2)
13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
14 | ;;
15 | 1)
16 | TARGET_DEVICE_ARGS="--target-device iphone"
17 | ;;
18 | 2)
19 | TARGET_DEVICE_ARGS="--target-device ipad"
20 | ;;
21 | *)
22 | TARGET_DEVICE_ARGS="--target-device mac"
23 | ;;
24 | esac
25 |
26 | install_resource()
27 | {
28 | if [[ "$1" = /* ]] ; then
29 | RESOURCE_PATH="$1"
30 | else
31 | RESOURCE_PATH="${PODS_ROOT}/$1"
32 | fi
33 | if [[ ! -e "$RESOURCE_PATH" ]] ; then
34 | cat << EOM
35 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script.
36 | EOM
37 | exit 1
38 | fi
39 | case $RESOURCE_PATH in
40 | *.storyboard)
41 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}"
42 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
43 | ;;
44 | *.xib)
45 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}"
46 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
47 | ;;
48 | *.framework)
49 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
50 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
51 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
52 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
53 | ;;
54 | *.xcdatamodel)
55 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\""
56 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
57 | ;;
58 | *.xcdatamodeld)
59 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\""
60 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
61 | ;;
62 | *.xcmappingmodel)
63 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\""
64 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
65 | ;;
66 | *.xcassets)
67 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH"
68 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
69 | ;;
70 | *)
71 | echo "$RESOURCE_PATH"
72 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
73 | ;;
74 | esac
75 | }
76 |
77 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
78 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
79 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then
80 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
81 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
82 | fi
83 | rm -f "$RESOURCES_TO_COPY"
84 |
85 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ]
86 | then
87 | # Find all other xcassets (this unfortunately includes those of path pods and other targets).
88 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
89 | while read line; do
90 | if [[ $line != "${PODS_ROOT}*" ]]; then
91 | XCASSET_FILES+=("$line")
92 | fi
93 | done <<<"$OTHER_XCASSETS"
94 |
95 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
96 | fi
97 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Pods-ZLSwipeableViewSwiftDemo/Pods-ZLSwipeableViewSwiftDemo-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
6 | FOUNDATION_EXPORT double Pods_ZLSwipeableViewSwiftDemoVersionNumber;
7 | FOUNDATION_EXPORT const unsigned char Pods_ZLSwipeableViewSwiftDemoVersionString[];
8 |
9 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Pods-ZLSwipeableViewSwiftDemo/Pods-ZLSwipeableViewSwiftDemo.debug.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES
3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Cartography" "$PODS_CONFIGURATION_BUILD_DIR/UIColor+FlatColors"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
6 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Cartography/Cartography.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/UIColor+FlatColors/UIColor_FlatColors.framework/Headers"
7 | OTHER_LDFLAGS = $(inherited) -framework "Cartography" -framework "UIColor_FlatColors"
8 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
9 | PODS_BUILD_DIR = $BUILD_DIR
10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
11 | PODS_ROOT = ${SRCROOT}/Pods
12 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Pods-ZLSwipeableViewSwiftDemo/Pods-ZLSwipeableViewSwiftDemo.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_ZLSwipeableViewSwiftDemo {
2 | umbrella header "Pods-ZLSwipeableViewSwiftDemo-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Pods-ZLSwipeableViewSwiftDemo/Pods-ZLSwipeableViewSwiftDemo.release.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES
3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Cartography" "$PODS_CONFIGURATION_BUILD_DIR/UIColor+FlatColors"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
6 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Cartography/Cartography.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/UIColor+FlatColors/UIColor_FlatColors.framework/Headers"
7 | OTHER_LDFLAGS = $(inherited) -framework "Cartography" -framework "UIColor_FlatColors"
8 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
9 | PODS_BUILD_DIR = $BUILD_DIR
10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
11 | PODS_ROOT = ${SRCROOT}/Pods
12 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Pods-ZLSwipeableViewSwiftDemoTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Pods-ZLSwipeableViewSwiftDemoTests/Pods-ZLSwipeableViewSwiftDemoTests-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 |
4 | ## Cartography
5 |
6 | Copyright (c) 2014 Robert Böhnke
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy
9 | of this software and associated documentation files (the "Software"), to deal
10 | in the Software without restriction, including without limitation the rights
11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | copies of the Software, and to permit persons to whom the Software is furnished
13 | to do so, subject to the following conditions:
14 |
15 | The above copyright notice and this permission notice shall be included in all
16 | copies or substantial portions of the Software.
17 |
18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 | THE SOFTWARE.
25 |
26 | This license does not apply to the contents of the images folder.
27 |
28 | ---
29 |
30 | This project uses portions of code from FLKAutoLayout,
31 | copyright (c) 2013 Florian Kugler
32 |
33 | Permission is hereby granted, free of charge, to any person obtaining a copy
34 | of this software and associated documentation files (the "Software"), to deal
35 | in the Software without restriction, including without limitation the rights
36 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
37 | copies of the Software, and to permit persons to whom the Software is furnished
38 | to do so, subject to the following conditions:
39 |
40 | The above copyright notice and this permission notice shall be included in all
41 | copies or substantial portions of the Software.
42 |
43 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
44 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
45 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
46 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
47 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
48 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
49 | THE SOFTWARE.
50 |
51 |
52 | ## UIColor+FlatColors
53 |
54 | The MIT License (MIT)
55 |
56 | Copyright (c) 2014 Giovanni Lodi
57 |
58 | Permission is hereby granted, free of charge, to any person obtaining a copy of
59 | this software and associated documentation files (the "Software"), to deal in
60 | the Software without restriction, including without limitation the rights to
61 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
62 | the Software, and to permit persons to whom the Software is furnished to do so,
63 | subject to the following conditions:
64 |
65 | The above copyright notice and this permission notice shall be included in all
66 | copies or substantial portions of the Software.
67 |
68 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
69 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
70 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
71 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
72 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
73 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
74 |
75 | Generated by CocoaPods - https://cocoapods.org
76 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Pods-ZLSwipeableViewSwiftDemoTests/Pods-ZLSwipeableViewSwiftDemoTests-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 | Copyright (c) 2014 Robert Böhnke <robb@robb.is>
18 |
19 | Permission is hereby granted, free of charge, to any person obtaining a copy
20 | of this software and associated documentation files (the "Software"), to deal
21 | in the Software without restriction, including without limitation the rights
22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23 | copies of the Software, and to permit persons to whom the Software is furnished
24 | to do so, subject to the following conditions:
25 |
26 | The above copyright notice and this permission notice shall be included in all
27 | copies or substantial portions of the Software.
28 |
29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
35 | THE SOFTWARE.
36 |
37 | This license does not apply to the contents of the images folder.
38 |
39 | ---
40 |
41 | This project uses portions of code from FLKAutoLayout,
42 | copyright (c) 2013 Florian Kugler <mail@floriankugler.de>
43 |
44 | Permission is hereby granted, free of charge, to any person obtaining a copy
45 | of this software and associated documentation files (the "Software"), to deal
46 | in the Software without restriction, including without limitation the rights
47 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
48 | copies of the Software, and to permit persons to whom the Software is furnished
49 | to do so, subject to the following conditions:
50 |
51 | The above copyright notice and this permission notice shall be included in all
52 | copies or substantial portions of the Software.
53 |
54 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
55 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
56 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
57 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
58 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
59 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
60 | THE SOFTWARE.
61 |
62 | License
63 | MIT
64 | Title
65 | Cartography
66 | Type
67 | PSGroupSpecifier
68 |
69 |
70 | FooterText
71 | The MIT License (MIT)
72 |
73 | Copyright (c) 2014 Giovanni Lodi
74 |
75 | Permission is hereby granted, free of charge, to any person obtaining a copy of
76 | this software and associated documentation files (the "Software"), to deal in
77 | the Software without restriction, including without limitation the rights to
78 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
79 | the Software, and to permit persons to whom the Software is furnished to do so,
80 | subject to the following conditions:
81 |
82 | The above copyright notice and this permission notice shall be included in all
83 | copies or substantial portions of the Software.
84 |
85 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
86 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
87 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
88 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
89 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
90 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
91 |
92 | License
93 | MIT
94 | Title
95 | UIColor+FlatColors
96 | Type
97 | PSGroupSpecifier
98 |
99 |
100 | FooterText
101 | Generated by CocoaPods - https://cocoapods.org
102 | Title
103 |
104 | Type
105 | PSGroupSpecifier
106 |
107 |
108 | StringsTable
109 | Acknowledgements
110 | Title
111 | Acknowledgements
112 |
113 |
114 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Pods-ZLSwipeableViewSwiftDemoTests/Pods-ZLSwipeableViewSwiftDemoTests-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_ZLSwipeableViewSwiftDemoTests : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_ZLSwipeableViewSwiftDemoTests
5 | @end
6 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Pods-ZLSwipeableViewSwiftDemoTests/Pods-ZLSwipeableViewSwiftDemoTests-frameworks.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 |
4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
6 |
7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
8 |
9 | install_framework()
10 | {
11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
12 | local source="${BUILT_PRODUCTS_DIR}/$1"
13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
15 | elif [ -r "$1" ]; then
16 | local source="$1"
17 | fi
18 |
19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
20 |
21 | if [ -L "${source}" ]; then
22 | echo "Symlinked..."
23 | source="$(readlink "${source}")"
24 | fi
25 |
26 | # use filter instead of exclude so missing patterns dont' throw errors
27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
29 |
30 | local basename
31 | basename="$(basename -s .framework "$1")"
32 | binary="${destination}/${basename}.framework/${basename}"
33 | if ! [ -r "$binary" ]; then
34 | binary="${destination}/${basename}"
35 | fi
36 |
37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device
38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
39 | strip_invalid_archs "$binary"
40 | fi
41 |
42 | # Resign the code if required by the build settings to avoid unstable apps
43 | code_sign_if_enabled "${destination}/$(basename "$1")"
44 |
45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
47 | local swift_runtime_libs
48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]})
49 | for lib in $swift_runtime_libs; do
50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
52 | code_sign_if_enabled "${destination}/${lib}"
53 | done
54 | fi
55 | }
56 |
57 | # Signs a framework with the provided identity
58 | code_sign_if_enabled() {
59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
60 | # Use the current code_sign_identitiy
61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\""
63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1"
64 | fi
65 | }
66 |
67 | # Strip invalid architectures
68 | strip_invalid_archs() {
69 | binary="$1"
70 | # Get architectures for current file
71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
72 | stripped=""
73 | for arch in $archs; do
74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then
75 | # Strip non-valid architectures in-place
76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1
77 | stripped="$stripped $arch"
78 | fi
79 | done
80 | if [[ "$stripped" ]]; then
81 | echo "Stripped $binary of architectures:$stripped"
82 | fi
83 | }
84 |
85 |
86 | if [[ "$CONFIGURATION" == "Debug" ]]; then
87 | install_framework "$BUILT_PRODUCTS_DIR/Cartography/Cartography.framework"
88 | install_framework "$BUILT_PRODUCTS_DIR/UIColor+FlatColors/UIColor_FlatColors.framework"
89 | fi
90 | if [[ "$CONFIGURATION" == "Release" ]]; then
91 | install_framework "$BUILT_PRODUCTS_DIR/Cartography/Cartography.framework"
92 | install_framework "$BUILT_PRODUCTS_DIR/UIColor+FlatColors/UIColor_FlatColors.framework"
93 | fi
94 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Pods-ZLSwipeableViewSwiftDemoTests/Pods-ZLSwipeableViewSwiftDemoTests-resources.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 |
4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
5 |
6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
7 | > "$RESOURCES_TO_COPY"
8 |
9 | XCASSET_FILES=()
10 |
11 | case "${TARGETED_DEVICE_FAMILY}" in
12 | 1,2)
13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
14 | ;;
15 | 1)
16 | TARGET_DEVICE_ARGS="--target-device iphone"
17 | ;;
18 | 2)
19 | TARGET_DEVICE_ARGS="--target-device ipad"
20 | ;;
21 | *)
22 | TARGET_DEVICE_ARGS="--target-device mac"
23 | ;;
24 | esac
25 |
26 | install_resource()
27 | {
28 | if [[ "$1" = /* ]] ; then
29 | RESOURCE_PATH="$1"
30 | else
31 | RESOURCE_PATH="${PODS_ROOT}/$1"
32 | fi
33 | if [[ ! -e "$RESOURCE_PATH" ]] ; then
34 | cat << EOM
35 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script.
36 | EOM
37 | exit 1
38 | fi
39 | case $RESOURCE_PATH in
40 | *.storyboard)
41 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}"
42 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
43 | ;;
44 | *.xib)
45 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}"
46 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
47 | ;;
48 | *.framework)
49 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
50 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
51 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
52 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
53 | ;;
54 | *.xcdatamodel)
55 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\""
56 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
57 | ;;
58 | *.xcdatamodeld)
59 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\""
60 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
61 | ;;
62 | *.xcmappingmodel)
63 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\""
64 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
65 | ;;
66 | *.xcassets)
67 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH"
68 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
69 | ;;
70 | *)
71 | echo "$RESOURCE_PATH"
72 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
73 | ;;
74 | esac
75 | }
76 |
77 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
78 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
79 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then
80 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
81 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
82 | fi
83 | rm -f "$RESOURCES_TO_COPY"
84 |
85 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ]
86 | then
87 | # Find all other xcassets (this unfortunately includes those of path pods and other targets).
88 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
89 | while read line; do
90 | if [[ $line != "${PODS_ROOT}*" ]]; then
91 | XCASSET_FILES+=("$line")
92 | fi
93 | done <<<"$OTHER_XCASSETS"
94 |
95 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
96 | fi
97 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Pods-ZLSwipeableViewSwiftDemoTests/Pods-ZLSwipeableViewSwiftDemoTests-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
6 | FOUNDATION_EXPORT double Pods_ZLSwipeableViewSwiftDemoTestsVersionNumber;
7 | FOUNDATION_EXPORT const unsigned char Pods_ZLSwipeableViewSwiftDemoTestsVersionString[];
8 |
9 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Pods-ZLSwipeableViewSwiftDemoTests/Pods-ZLSwipeableViewSwiftDemoTests.debug.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES
3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Cartography" "$PODS_CONFIGURATION_BUILD_DIR/UIColor+FlatColors"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
6 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Cartography/Cartography.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/UIColor+FlatColors/UIColor_FlatColors.framework/Headers"
7 | OTHER_LDFLAGS = $(inherited) -framework "Cartography" -framework "UIColor_FlatColors"
8 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
9 | PODS_BUILD_DIR = $BUILD_DIR
10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
11 | PODS_ROOT = ${SRCROOT}/Pods
12 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Pods-ZLSwipeableViewSwiftDemoTests/Pods-ZLSwipeableViewSwiftDemoTests.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_ZLSwipeableViewSwiftDemoTests {
2 | umbrella header "Pods-ZLSwipeableViewSwiftDemoTests-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/Pods-ZLSwipeableViewSwiftDemoTests/Pods-ZLSwipeableViewSwiftDemoTests.release.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES
3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Cartography" "$PODS_CONFIGURATION_BUILD_DIR/UIColor+FlatColors"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
6 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Cartography/Cartography.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/UIColor+FlatColors/UIColor_FlatColors.framework/Headers"
7 | OTHER_LDFLAGS = $(inherited) -framework "Cartography" -framework "UIColor_FlatColors"
8 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
9 | PODS_BUILD_DIR = $BUILD_DIR
10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
11 | PODS_ROOT = ${SRCROOT}/Pods
12 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/UIColor+FlatColors/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 0.0.2
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/UIColor+FlatColors/UIColor+FlatColors-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_UIColor_FlatColors : NSObject
3 | @end
4 | @implementation PodsDummy_UIColor_FlatColors
5 | @end
6 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/UIColor+FlatColors/UIColor+FlatColors-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/UIColor+FlatColors/UIColor+FlatColors-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 | #import "UIColor+FlatColors.h"
6 |
7 | FOUNDATION_EXPORT double UIColor_FlatColorsVersionNumber;
8 | FOUNDATION_EXPORT const unsigned char UIColor_FlatColorsVersionString[];
9 |
10 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/UIColor+FlatColors/UIColor+FlatColors.modulemap:
--------------------------------------------------------------------------------
1 | framework module UIColor_FlatColors {
2 | umbrella header "UIColor+FlatColors-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/Target Support Files/UIColor+FlatColors/UIColor+FlatColors.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/UIColor+FlatColors
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public"
4 | PODS_BUILD_DIR = $BUILD_DIR
5 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
6 | PODS_ROOT = ${SRCROOT}
7 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
8 | SKIP_INSTALL = YES
9 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/UIColor+FlatColors/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Giovanni Lodi
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/UIColor+FlatColors/README.md:
--------------------------------------------------------------------------------
1 | UIColor+FlatColors
2 | ==================
3 |
4 | `UIColor+FlatColors` is a category that extends `UIColor` with methods to get the colors from the [Flat UI](http://designmodo.github.io/Flat-UI/) framework by [designmodo](http://designmodo.com/).
5 |
6 | That's it.
7 |
8 |
9 |
10 | I suggest you take a look at [FlatUIKit](https://github.com/Grouper/FlatUIKit) if you are looking for the full components of the Flat UI framework to use in your app.
11 |
12 | ## Installation with CocoaPods
13 |
14 | ```ruby
15 | platform :ios
16 |
17 | pod 'UIColor+FlatColors'
18 | ```
19 |
20 | ## Usage
21 |
22 | Get the colors from a `UIColor` class method following this naming pattern: `flat<# color_name #>Color`. To see all the available colors check [flatuicolors.com](http://flatuicolors.com/).
23 |
24 | ```objc
25 | someViewYouWantToColor.backgroundColor = [UIColor flatEmeraldColor];
26 | ```
27 |
28 | ## License
29 |
30 | `UIColor+FlatColors` is released under the [MIT license](https://github.com/mokagio/UIColor-FlatColors/blob/master/LICENSE).
31 |
32 | ---
33 |
34 | Hacked together with passion by [@mokagio](https://twitter.com/mokagio)
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/UIColor+FlatColors/UIColor+FlatColors/UIColor+FlatColors.h:
--------------------------------------------------------------------------------
1 | // The MIT License (MIT)
2 | //
3 | // Copyright (c) 2014 Giovanni Lodi
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | // this software and associated documentation files (the "Software"), to deal in
7 | // the Software without restriction, including without limitation the rights to
8 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | // the Software, and to permit persons to whom the Software is furnished to do so,
10 | // subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
22 | #import
23 |
24 | @interface UIColor (FlatColors)
25 |
26 | + (UIColor *)flatTurquoiseColor;
27 |
28 | + (UIColor *)flatGreenSeaColor;
29 |
30 | + (UIColor *)flatEmeraldColor;
31 |
32 | + (UIColor *)flatNephritisColor;
33 |
34 | + (UIColor *)flatPeterRiverColor;
35 |
36 | + (UIColor *)flatBelizeHoleColor;
37 |
38 | + (UIColor *)flatAmethystColor;
39 |
40 | + (UIColor *)flatWisteriaColor;
41 |
42 | + (UIColor *)flatWetAsphaltColor;
43 |
44 | + (UIColor *)flatMidnightBlueColor;
45 |
46 | + (UIColor *)flatSunFlowerColor;
47 |
48 | + (UIColor *)flatOrangeColor;
49 |
50 | + (UIColor *)flatCarrotColor;
51 |
52 | + (UIColor *)flatPumpkinColor;
53 |
54 | + (UIColor *)flatAlizarinColor;
55 |
56 | + (UIColor *)flatPomegranateColor;
57 |
58 | + (UIColor *)flatCloudsColor;
59 |
60 | + (UIColor *)flatSilverColor;
61 |
62 | + (UIColor *)flatConcreteColor;
63 |
64 | + (UIColor *)flatAsbestosColor;
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/Pods/UIColor+FlatColors/UIColor+FlatColors/UIColor+FlatColors.m:
--------------------------------------------------------------------------------
1 | // The MIT License (MIT)
2 | //
3 | // Copyright (c) 2014 Giovanni Lodi
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | // this software and associated documentation files (the "Software"), to deal in
7 | // the Software without restriction, including without limitation the rights to
8 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | // the Software, and to permit persons to whom the Software is furnished to do so,
10 | // subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
22 | #import "UIColor+FlatColors.h"
23 |
24 | @implementation UIColor (FlatColors)
25 |
26 | // See http://blog.alexedge.co.uk/speeding-up-uicolor-categories/
27 | #define AGEColorImplement(COLOR_NAME,RED,GREEN,BLUE) \
28 | + (UIColor *)COLOR_NAME{ \
29 | static UIColor* COLOR_NAME##_color; \
30 | static dispatch_once_t COLOR_NAME##_onceToken; \
31 | dispatch_once(&COLOR_NAME##_onceToken, ^{ \
32 | COLOR_NAME##_color = [UIColor colorWithRed:RED green:GREEN blue:BLUE alpha:1.0]; \
33 | }); \
34 | return COLOR_NAME##_color; \
35 | }
36 |
37 | AGEColorImplement(flatTurquoiseColor, 0.10196078431372549, 0.7372549019607844, 0.611764705882353)
38 | AGEColorImplement(flatGreenSeaColor, 0.08627450980392157, 0.6274509803921569, 0.5215686274509804)
39 | AGEColorImplement(flatEmeraldColor, 0.1803921568627451, 0.8, 0.44313725490196076)
40 | AGEColorImplement(flatNephritisColor, 0.15294117647058825, 0.6823529411764706, 0.3764705882352941)
41 | AGEColorImplement(flatPeterRiverColor, 0.20392156862745098, 0.596078431372549, 0.8588235294117647)
42 | AGEColorImplement(flatBelizeHoleColor, 0.1607843137254902, 0.5019607843137255, 0.7254901960784313)
43 | AGEColorImplement(flatAmethystColor, 0.6078431372549019, 0.34901960784313724, 0.7137254901960784)
44 | AGEColorImplement(flatWisteriaColor, 0.5568627450980392, 0.26666666666666666, 0.6784313725490196)
45 | AGEColorImplement(flatWetAsphaltColor, 0.20392156862745098, 0.28627450980392155, 0.3686274509803922)
46 | AGEColorImplement(flatMidnightBlueColor, 0.17254901960784313, 0.24313725490196078, 0.3137254901960784)
47 | AGEColorImplement(flatSunFlowerColor, 0.9450980392156862, 0.7686274509803922, 0.058823529411764705)
48 | AGEColorImplement(flatOrangeColor, 0.9529411764705882, 0.611764705882353, 0.07058823529411765)
49 | AGEColorImplement(flatCarrotColor, 0.9019607843137255, 0.49411764705882355, 0.13333333333333333)
50 | AGEColorImplement(flatPumpkinColor, 0.8274509803921568, 0.32941176470588235, 0)
51 | AGEColorImplement(flatAlizarinColor, 0.9058823529411765, 0.2980392156862745, 0.23529411764705882)
52 | AGEColorImplement(flatPomegranateColor, 0.7529411764705882, 0.2235294117647059, 0.16862745098039217)
53 | AGEColorImplement(flatCloudsColor, 0.9254901960784314, 0.9411764705882353, 0.9450980392156862)
54 | AGEColorImplement(flatSilverColor, 0.7411764705882353, 0.7647058823529411, 0.7803921568627451)
55 | AGEColorImplement(flatConcreteColor, 0.5843137254901961, 0.6470588235294118, 0.6509803921568628)
56 | AGEColorImplement(flatAsbestosColor, 0.4980392156862745, 0.5490196078431373, 0.5529411764705883)
57 |
58 | @end
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemo.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemo/AlwaysSwipeDemoViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AlwaysSwipeViewController.swift
3 | // ZLSwipeableViewSwiftDemo
4 | //
5 | // Created by Zhixuan Lai on 10/23/15.
6 | // Copyright © 2015 Zhixuan Lai. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class AlwaysSwipeDemoViewController: ZLSwipeableViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 |
16 | swipeableView.shouldSwipeView = { _, _, _ in true }
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemo/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // ZLSwipeableViewSwiftDemo
4 | //
5 | // Created by Zhixuan Lai on 4/27/15.
6 | // Copyright (c) 2015 Zhixuan Lai. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18 | window = UIWindow(frame: UIScreen.main.bounds)
19 | if let window = window {
20 | let menuViewController = MenuTableViewController(style: .grouped)
21 | window.rootViewController = UINavigationController(rootViewController: menuViewController)
22 | window.makeKeyAndVisible()
23 | }
24 | return true
25 | }
26 |
27 | func applicationWillResignActive(_ application: UIApplication) {
28 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
29 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
30 | }
31 |
32 | func applicationDidEnterBackground(_ application: UIApplication) {
33 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
34 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
35 | }
36 |
37 | func applicationWillEnterForeground(_ application: UIApplication) {
38 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
39 | }
40 |
41 | func applicationDidBecomeActive(_ application: UIApplication) {
42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
43 | }
44 |
45 | func applicationWillTerminate(_ application: UIApplication) {
46 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
47 | }
48 |
49 |
50 | }
51 |
52 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemo/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemo/CardContentView.xib:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemo/CardView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CardView.swift
3 | // ZLSwipeableViewSwiftDemo
4 | //
5 | // Created by Zhixuan Lai on 5/24/15.
6 | // Copyright (c) 2015 Zhixuan Lai. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class CardView: UIView {
12 |
13 | override init(frame: CGRect) {
14 | super.init(frame: frame)
15 | setup()
16 | }
17 |
18 | required init?(coder aDecoder: NSCoder) {
19 | super.init(coder: aDecoder)
20 | setup()
21 | }
22 |
23 | func setup() {
24 | // Shadow
25 | layer.shadowColor = UIColor.black.cgColor
26 | layer.shadowOpacity = 0.25
27 | layer.shadowOffset = CGSize(width: 0, height: 1.5)
28 | layer.shadowRadius = 4.0
29 | layer.shouldRasterize = true
30 | layer.rasterizationScale = UIScreen.main.scale
31 |
32 | // Corner Radius
33 | layer.cornerRadius = 10.0;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemo/CustomAnimationDemoViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CustomAnimationDemoViewController.swift
3 | // ZLSwipeableViewSwiftDemo
4 | //
5 | // Created by Zhixuan Lai on 5/25/15.
6 | // Copyright (c) 2015 Zhixuan Lai. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class CustomAnimationDemoViewController: ZLSwipeableViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | func toRadian(_ degree: CGFloat) -> CGFloat {
16 | return degree * CGFloat(Double.pi/180)
17 | }
18 | func rotateAndTranslateView(_ view: UIView, forDegree degree: CGFloat, translation: CGPoint, duration: TimeInterval, offsetFromCenter offset: CGPoint, swipeableView: ZLSwipeableView) {
19 | UIView.animate(withDuration: duration, delay: 0, options: .allowUserInteraction, animations: {
20 | view.center = swipeableView.convert(swipeableView.center, from: swipeableView.superview)
21 | var transform = CGAffineTransform(translationX: offset.x, y: offset.y)
22 | transform = transform.rotated(by: toRadian(degree))
23 | transform = transform.translatedBy(x: -offset.x, y: -offset.y)
24 | transform = transform.translatedBy(x: translation.x, y: translation.y)
25 | view.transform = transform
26 | }, completion: nil)
27 | }
28 | swipeableView.numberOfActiveView = 10
29 | swipeableView.animateView = {(view: UIView, index: Int, views: [UIView], swipeableView: ZLSwipeableView) in
30 | let degree = CGFloat(sin(0.5*Double(index)))
31 | let offset = CGPoint(x: 0, y: swipeableView.bounds.height*0.3)
32 | let translation = CGPoint(x: degree*10, y: CGFloat(-index*5))
33 | let duration = 0.4
34 | rotateAndTranslateView(view, forDegree: degree, translation: translation, duration: duration, offsetFromCenter: offset, swipeableView: swipeableView)
35 | }
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemo/CustomDirectionDemoViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CustomDirectionDemoViewController.swift
3 | // ZLSwipeableViewSwiftDemo
4 | //
5 | // Created by Zhixuan Lai on 5/25/15.
6 | // Copyright (c) 2015 Zhixuan Lai. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class CustomDirectionDemoViewController: ZLSwipeableViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 |
16 | let segmentControl = UISegmentedControl(items: [" ", "←", "↑", "→", "↓", "↔︎", "↕︎", "☩"])
17 | segmentControl.selectedSegmentIndex = 5
18 | navigationItem.titleView = segmentControl
19 |
20 | segmentControl.addTarget(self, action: #selector(segmentedControlFired), for: .valueChanged)
21 | }
22 |
23 | // MARK: - Actions
24 |
25 | @objc func segmentedControlFired(control: AnyObject?) {
26 | if let control = control as? UISegmentedControl {
27 | let directions: [ZLSwipeableViewDirection] = [.None, .Left, .Up, .Right, .Down, .Horizontal, .Vertical, .All]
28 | self.swipeableView.allowedDirection = directions[control.selectedSegmentIndex]
29 | }
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemo/CustomSwipeDemoViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CustomSwipeDemoViewController.swift
3 | // ZLSwipeableViewSwiftDemo
4 | //
5 | // Created by Zhixuan Lai on 5/25/15.
6 | // Copyright (c) 2015 Zhixuan Lai. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class CustomSwipeDemoViewController: ZLSwipeableViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 |
16 | leftBarButtonItem.action = #selector(leftBarButtonAction)
17 | upBarButtonItem.action = #selector(upBarButtonAction)
18 |
19 | // change how ZLSwipeableViewDirection gets interpreted to location and direction
20 | swipeableView.interpretDirection = {(topView: UIView, direction: ZLSwipeableViewDirection, views: [UIView], swipeableView: ZLSwipeableView) in
21 | let programmaticSwipeVelocity = CGFloat(500)
22 | let location = CGPoint(x: topView.center.x-30, y: topView.center.y*0.1)
23 | var directionVector: CGVector?
24 | switch direction {
25 | case ZLSwipeableViewDirection.Left:
26 | directionVector = CGVector(dx: -programmaticSwipeVelocity, dy: 0)
27 | case ZLSwipeableViewDirection.Right:
28 | directionVector = CGVector(dx: programmaticSwipeVelocity, dy: 0)
29 | case ZLSwipeableViewDirection.Up:
30 | directionVector = CGVector(dx: 0, dy: -programmaticSwipeVelocity)
31 | case ZLSwipeableViewDirection.Down:
32 | directionVector = CGVector(dx: 0, dy: programmaticSwipeVelocity)
33 | default:
34 | directionVector = CGVector(dx: 0, dy: 0)
35 | }
36 | return (location, directionVector!)
37 | }
38 |
39 | }
40 |
41 | // MARK: - Actions
42 |
43 | @objc func leftBarButtonAction() {
44 | self.swipeableView.swipeTopView(fromPoint: CGPoint(x: 10, y: 300), inDirection: CGVector(dx: -700, dy: -300))
45 | }
46 |
47 | @objc func upBarButtonAction() {
48 | self.swipeableView.swipeTopView(fromPoint: CGPoint(x: 100, y: 30), inDirection: CGVector(dx: 100, dy: -800))
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemo/HistoryDemoViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UndoDemoViewController.swift
3 | // ZLSwipeableViewSwiftDemo
4 | //
5 | // Created by Zhixuan Lai on 5/25/15.
6 | // Copyright (c) 2015 Zhixuan Lai. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class HistoryDemoViewController: ZLSwipeableViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 |
16 | swipeableView.numberOfHistoryItem = UInt.max
17 | swipeableView.allowedDirection = Direction.All
18 |
19 | let rightBarButtonItemTitle = "Rewind"
20 |
21 | func updateRightBarButtonItem() {
22 | let historyLength = self.swipeableView.history.count
23 | let enabled = historyLength != 0
24 | self.navigationItem.rightBarButtonItem?.isEnabled = enabled
25 | if !enabled {
26 | self.navigationItem.rightBarButtonItem?.title = rightBarButtonItemTitle
27 | return
28 | }
29 | let suffix = " (\(historyLength))"
30 | self.navigationItem.rightBarButtonItem?.title = "\(rightBarButtonItemTitle)\(suffix)"
31 | }
32 |
33 | swipeableView.didSwipe = {view, direction, vector in
34 | print("Did swipe view in direction: \(direction)")
35 | updateRightBarButtonItem()
36 | }
37 |
38 | // ↺
39 | let rightButton = UIBarButtonItem(title: rightBarButtonItemTitle, style: .plain, target: self, action: #selector(rightButtonClicked))
40 | navigationItem.rightBarButtonItem = rightButton
41 |
42 | updateRightBarButtonItem()
43 | }
44 |
45 | // MARK: - Actions
46 |
47 | @objc func rightButtonClicked() {
48 | self.swipeableView.rewind()
49 | // updateRightBarButtonItem()
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemo/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemo/MenuTableViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MenuTableViewController.swift
3 | // ZLSwipeableViewSwiftDemo
4 | //
5 | // Created by Zhixuan Lai on 5/25/15.
6 | // Copyright (c) 2015 Zhixuan Lai. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class MenuTableViewController: UITableViewController {
12 |
13 | let demoViewControllers = [("Default", ZLSwipeableViewController.self),
14 | ("Custom Animation", CustomAnimationDemoViewController.self),
15 | ("Custom Swipe", CustomSwipeDemoViewController.self),
16 | ("Allowed Direction", CustomDirectionDemoViewController.self),
17 | ("History", HistoryDemoViewController.self),
18 | ("Previous View", PreviousViewDemoViewController.self),
19 | ("Should Swipe", ShouldSwipeDemoViewController.self),
20 | ("Always Swipe", AlwaysSwipeDemoViewController.self)]
21 |
22 | override func viewDidLoad() {
23 | super.viewDidLoad()
24 |
25 | title = "ZLSwipeableView"
26 | }
27 |
28 | // MARK: - Table view data source
29 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
30 | return demoViewControllers.count
31 | }
32 |
33 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
34 | let cellIdentifier = String(format: "s%li-r%li", indexPath.section, indexPath.row)
35 | var cell: UITableViewCell! = tableView.dequeueReusableCell(withIdentifier: cellIdentifier)
36 | if cell == nil {
37 | cell = UITableViewCell(style: .default, reuseIdentifier: cellIdentifier)
38 | }
39 |
40 | cell.textLabel?.text = titleForRowAtIndexPath(indexPath)
41 | cell.accessoryType = .disclosureIndicator
42 | return cell
43 | }
44 |
45 | override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
46 | tableView.deselectRow(at: indexPath, animated: true)
47 |
48 | let title = titleForRowAtIndexPath(indexPath)
49 | let vc = viewControllerForRowAtIndexPath(indexPath)
50 | vc.title = title
51 | navigationController?.pushViewController(vc, animated: true)
52 | }
53 |
54 | func titleForRowAtIndexPath(_ indexPath: IndexPath) -> String {
55 | let (title, _) = demoViewControllers[indexPath.row]
56 | return title
57 | }
58 |
59 | func viewControllerForRowAtIndexPath(_ indexPath: IndexPath) -> ZLSwipeableViewController {
60 | let (_, vc) = demoViewControllers[indexPath.row]
61 | return vc.init()
62 | }
63 |
64 | }
65 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemo/PreviousViewDemoViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // PreviousViewDemoViewController.swift
3 | // ZLSwipeableViewSwiftDemo
4 | //
5 | // Created by Zhixuan Lai on 10/23/15.
6 | // Copyright © 2015 Zhixuan Lai. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | public func +(lhs: CGPoint, rhs: CGPoint) -> CGPoint {
12 | return CGPoint(x: lhs.x + rhs.x, y: lhs.y + rhs.y)
13 | }
14 |
15 | class PreviousViewDemoViewController: ZLSwipeableViewController {
16 |
17 | override func viewDidLoad() {
18 | super.viewDidLoad()
19 |
20 | swipeableView.numberOfHistoryItem = UInt.max
21 | swipeableView.allowedDirection = Direction.All
22 |
23 | let rightBarButtonItemTitle = "Load Previous"
24 |
25 | swipeableView.previousView = {
26 | if let view = self.nextCardView() {
27 | self.applyRandomTansform(view)
28 | return view
29 | }
30 | return nil
31 | }
32 |
33 | // ↺
34 | let rightBarButtonItem = UIBarButtonItem(title: rightBarButtonItemTitle, style: .plain, target: self, action: #selector(rightBarButtonClicked))
35 | navigationItem.rightBarButtonItem = rightBarButtonItem
36 |
37 | // Load previous by tap the card
38 | // swipeableView.didTap = {view, location in
39 | // self.swipeableView.rewind()
40 | // }
41 | }
42 |
43 | func applyRandomTansform(_ view: UIView) {
44 | let width = swipeableView.bounds.width
45 | let height = swipeableView.bounds.height
46 | let distance = max(width, height)
47 |
48 | func randomRadian() -> CGFloat {
49 | return CGFloat(arc4random() % 360) * CGFloat(Double.pi / 180)
50 | }
51 |
52 | var transform = CGAffineTransform(rotationAngle: randomRadian())
53 | transform = transform.translatedBy(x: distance, y: 0)
54 | transform = transform.rotated(by: randomRadian())
55 | view.transform = transform
56 | }
57 |
58 | // MARK: - Actions
59 |
60 | @objc func rightBarButtonClicked() {
61 | self.swipeableView.rewind()
62 | }
63 |
64 | }
65 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemo/ShouldSwipeDemoViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ShouldSwipeDemoViewController.swift
3 | // ZLSwipeableViewSwiftDemo
4 | //
5 | // Created by Zhixuan Lai on 6/17/15.
6 | // Copyright © 2015 Zhixuan Lai. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ShouldSwipeDemoViewController: ZLSwipeableViewController {
12 |
13 | var shouldSwipe = true
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 |
17 | self.title = "Should Swipe 👍"
18 |
19 | Timer.scheduledTimer(timeInterval: 3, target: self, selector: #selector(handleTimer), userInfo: nil, repeats: true)
20 |
21 | let defaultHandler = swipeableView.shouldSwipeView
22 | swipeableView.shouldSwipeView = {(view: UIView, movement: Movement, swipeableView: ZLSwipeableView) in
23 | self.shouldSwipe && defaultHandler(view, movement, swipeableView)
24 | }
25 | }
26 |
27 | // MARK: - Actions
28 |
29 | @objc func handleTimer() {
30 | self.shouldSwipe = !self.shouldSwipe
31 | self.title = "Should Swipe " + (self.shouldSwipe ? "👍" : "👎")
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemo/ZLSwipeableViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // ZLSwipeableViewSwiftDemo
4 | //
5 | // Created by Zhixuan Lai on 4/27/15.
6 | // Copyright (c) 2015 Zhixuan Lai. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import UIColor_FlatColors
11 | import Cartography
12 |
13 | class ZLSwipeableViewController: UIViewController {
14 |
15 | var swipeableView: ZLSwipeableView!
16 |
17 | var colors = ["Turquoise", "Green Sea", "Emerald", "Nephritis", "Peter River", "Belize Hole", "Amethyst", "Wisteria", "Wet Asphalt", "Midnight Blue", "Sun Flower", "Orange", "Carrot", "Pumpkin", "Alizarin", "Pomegranate", "Clouds", "Silver", "Concrete", "Asbestos"]
18 | var colorIndex = 0
19 | var loadCardsFromXib = false
20 |
21 | var reloadBarButtonItem: UIBarButtonItem!
22 | // var reloadBarButtonItem = UIBarButtonItem(barButtonSystemItem: "Reload", target: .Plain) { item in }
23 | var leftBarButtonItem: UIBarButtonItem!
24 | // var leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: "←", target: .Plain) { item in }
25 | var upBarButtonItem: UIBarButtonItem!
26 | // var upBarButtonItem = UIBarButtonItem(barButtonSystemItem: "↑", target: .Plain) { item in }
27 | var rightBarButtonItem: UIBarButtonItem!
28 | // var rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: "→", target: .Plain) { item in }
29 | var downBarButtonItem:UIBarButtonItem!
30 | // var downBarButtonItem = UIBarButtonItem(barButtonSystemItem: "↓", target: .Plain) { item in }
31 |
32 | override func viewDidLayoutSubviews() {
33 | super.viewDidLayoutSubviews()
34 | swipeableView.nextView = {
35 | return self.nextCardView()
36 | }
37 | }
38 |
39 | override func viewDidLoad() {
40 | super.viewDidLoad()
41 | navigationController?.setToolbarHidden(false, animated: false)
42 | view.backgroundColor = UIColor.white
43 | view.clipsToBounds = true
44 |
45 | reloadBarButtonItem = UIBarButtonItem(title: "Reload", style: .plain, target: self, action: #selector(reloadButtonAction))
46 | leftBarButtonItem = UIBarButtonItem(title: "←", style: .plain, target: self, action: #selector(leftButtonAction))
47 | upBarButtonItem = UIBarButtonItem(title: "↑", style: .plain, target: self, action: #selector(upButtonAction))
48 | rightBarButtonItem = UIBarButtonItem(title: "→", style: .plain, target: self, action: #selector(rightButtonAction))
49 | downBarButtonItem = UIBarButtonItem(title: "↓", style: .plain, target: self, action: #selector(downButtonAction))
50 |
51 | let fixedSpace = UIBarButtonItem(barButtonSystemItem: .fixedSpace, target: nil, action: nil)
52 | let flexibleSpace = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil)
53 |
54 | let items = [fixedSpace, reloadBarButtonItem!, flexibleSpace, leftBarButtonItem!, flexibleSpace, upBarButtonItem!, flexibleSpace, rightBarButtonItem!, flexibleSpace, downBarButtonItem!, fixedSpace]
55 | toolbarItems = items
56 |
57 | swipeableView = ZLSwipeableView()
58 | view.addSubview(swipeableView)
59 | swipeableView.didStart = {view, location in
60 | print("Did start swiping view at location: \(location)")
61 | }
62 | swipeableView.swiping = {view, location, translation in
63 | print("Swiping at view location: \(location) translation: \(translation)")
64 | }
65 | swipeableView.didEnd = {view, location in
66 | print("Did end swiping view at location: \(location)")
67 | }
68 | swipeableView.didSwipe = {view, direction, vector in
69 | print("Did swipe view in direction: \(direction), vector: \(vector)")
70 | }
71 | swipeableView.didCancel = {view in
72 | print("Did cancel swiping view")
73 | }
74 | swipeableView.didTap = {view, location in
75 | print("Did tap at location \(location)")
76 | }
77 | swipeableView.didDisappear = { view in
78 | print("Did disappear swiping view")
79 | }
80 |
81 | constrain(swipeableView, view) { view1, view2 in
82 | view1.left == view2.left+50
83 | view1.right == view2.right-50
84 | view1.top == view2.top + 120
85 | view1.bottom == view2.bottom - 100
86 | }
87 | }
88 |
89 | // MARK: - Actions
90 |
91 | @objc func reloadButtonAction() {
92 | let alertController = UIAlertController(title: nil, message: "Load Cards:", preferredStyle: .actionSheet)
93 |
94 | let cancelAction = UIAlertAction(title: "Cancel", style: .cancel) { (action) in
95 | // ...
96 | }
97 | alertController.addAction(cancelAction)
98 |
99 | let ProgrammaticallyAction = UIAlertAction(title: "Programmatically", style: .default) { (action) in
100 | self.loadCardsFromXib = false
101 | self.colorIndex = 0
102 | self.swipeableView.discardViews()
103 | self.swipeableView.loadViews()
104 | }
105 | alertController.addAction(ProgrammaticallyAction)
106 |
107 | let XibAction = UIAlertAction(title: "From Xib", style: .default) { (action) in
108 | self.loadCardsFromXib = true
109 | self.colorIndex = 0
110 | self.swipeableView.discardViews()
111 | self.swipeableView.loadViews()
112 | }
113 | alertController.addAction(XibAction)
114 |
115 | self.present(alertController, animated: true, completion: nil)
116 | }
117 |
118 | @objc func leftButtonAction() {
119 | self.swipeableView.swipeTopView(inDirection: .Left)
120 | }
121 |
122 | @objc func upButtonAction() {
123 | self.swipeableView.swipeTopView(inDirection: .Up)
124 | }
125 |
126 | @objc func rightButtonAction() {
127 | self.swipeableView.swipeTopView(inDirection: .Right)
128 | }
129 |
130 | @objc func downButtonAction() {
131 | self.swipeableView.swipeTopView(inDirection: .Down)
132 | }
133 |
134 | // MARK: ()
135 | func nextCardView() -> UIView? {
136 | if colorIndex >= colors.count {
137 | colorIndex = 0
138 | }
139 |
140 | let cardView = CardView(frame: swipeableView.bounds)
141 | cardView.backgroundColor = colorForName(colors[colorIndex])
142 | colorIndex += 1
143 |
144 | if loadCardsFromXib {
145 | let contentView = Bundle.main.loadNibNamed("CardContentView", owner: self, options: nil)?.first! as! UIView
146 | contentView.translatesAutoresizingMaskIntoConstraints = false
147 | contentView.backgroundColor = cardView.backgroundColor
148 | cardView.addSubview(contentView)
149 |
150 | // This is important:
151 | // https://github.com/zhxnlai/ZLSwipeableView/issues/9
152 | /*// Alternative:
153 | let metrics = ["width":cardView.bounds.width, "height": cardView.bounds.height]
154 | let views = ["contentView": contentView, "cardView": cardView]
155 | cardView.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|[contentView(width)]", options: .AlignAllLeft, metrics: metrics, views: views))
156 | cardView.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:|[contentView(height)]", options: .AlignAllLeft, metrics: metrics, views: views))
157 | */
158 | constrain(contentView, cardView) { view1, view2 in
159 | view1.left == view2.left
160 | view1.top == view2.top
161 | view1.width == cardView.bounds.width
162 | view1.height == cardView.bounds.height
163 | }
164 | }
165 | return cardView
166 | }
167 |
168 | func colorForName(_ name: String) -> UIColor {
169 | let sanitizedName = name.replacingOccurrences(of: " ", with: "")
170 | let selector = "flat\(sanitizedName)Color"
171 | return UIColor.perform(Selector(selector)).takeUnretainedValue() as! UIColor
172 | }
173 | }
174 |
175 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemoTests/DirectionTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DirectionTests.swift
3 | // ZLSwipeableViewSwiftDemo
4 | //
5 | // Created by Zhixuan Lai on 10/22/15.
6 | // Copyright © 2015 Zhixuan Lai. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | import ZLSwipeableViewSwiftDemo
11 |
12 | class DirectionTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testFromPoint() {
25 | XCTAssertEqual(Direction.fromPoint(CGPoint(x: 1, y: 0)), Direction.Right)
26 | XCTAssertEqual(Direction.fromPoint(CGPoint(x: -1, y: 0)), Direction.Left)
27 | XCTAssertEqual(Direction.fromPoint(CGPoint(x: 0, y: -1)), Direction.Up)
28 | XCTAssertEqual(Direction.fromPoint(CGPoint(x: 0, y: 1)), Direction.Down)
29 | XCTAssertEqual(Direction.fromPoint(CGPoint(x: 0, y: 0)), Direction.None)
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemoTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemoTests/ViewManagerTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewManagerTests.swift
3 | // ZLSwipeableViewSwiftDemo
4 | //
5 | // Created by Zhixuan Lai on 10/22/15.
6 | // Copyright © 2015 Zhixuan Lai. All rights reserved.
7 | //
8 |
9 | import XCTest
10 |
11 | class ViewManagerTests: XCTestCase {
12 |
13 | override func setUp() {
14 | super.setUp()
15 | // Put setup code here. This method is called before the invocation of each test method in the class.
16 | }
17 |
18 | override func tearDown() {
19 | // Put teardown code here. This method is called after the invocation of each test method in the class.
20 | super.tearDown()
21 | }
22 |
23 | func testStateTransition() {
24 | // simulate pan gesture
25 | }
26 |
27 | func testPerformanceExample() {
28 | // This is an example of a performance test case.
29 | self.measure {
30 | // Put the code you want to measure the time of here.
31 | }
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemoTests/ZLSwipeableViewSwiftDemoTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ZLSwipeableViewSwiftDemoTests.swift
3 | // ZLSwipeableViewSwiftDemoTests
4 | //
5 | // Created by Zhixuan Lai on 4/27/15.
6 | // Copyright (c) 2015 Zhixuan Lai. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class ZLSwipeableViewSwiftDemoTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measure() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------