0001 // 0002 // SnapKit 0003 // 0004 // Copyright (c) 2011-2015 SnapKit Team - https://github.com/SnapKit 0005 // 0006 // Permission is hereby granted, free of charge, to any person obtaining a copy 0007 // of this software and associated documentation files (the "Software"), to deal 0008 // in the Software without restriction, including without limitation the rights 0009 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 0010 // copies of the Software, and to permit persons to whom the Software is 0011 // furnished to do so, subject to the following conditions: 0012 // 0013 // The above copyright notice and this permission notice shall be included in 0014 // all copies or substantial portions of the Software. 0015 // 0016 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 0017 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 0018 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 0019 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 0020 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 0021 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 0022 // THE SOFTWARE. 0023 0024 #if os(iOS) || os(tvOS) 0025 import UIKit 0026 public typealias InterfaceLayoutDirection = UIUserInterfaceLayoutDirection 0027 public typealias LayoutSupport = UILayoutSupport 0028 #else 0029 import AppKit 0030 public typealias InterfaceLayoutDirection= NSUserInterfaceLayoutDirection 0031 public class LayoutSupport
SnapKit.swift:40 public static var interfaceLayoutDirection = InterfaceLayoutDirection.LeftToRight{} 0032 #endif 0033 0034 /** 0035 Used to configure different parts of SnapKit 0036 */ 0037 public struct Config
ConstraintDescription.swift:97 func equalTo(other: LayoutSupport) -> ConstraintDescriptionEditableConstraintDescription.swift:112 func lessThanOrEqualTo(other: LayoutSupport) -> ConstraintDescriptionEditableConstraintDescription.swift:127 func greaterThanOrEqualTo(other: LayoutSupport) -> ConstraintDescriptionEditableConstraintDescription.swift:230 internal func equalTo(other: LayoutSupport) -> ConstraintDescriptionEditable {ConstraintDescription.swift:271 internal func lessThanOrEqualTo(other: LayoutSupport) -> ConstraintDescriptionEditable {ConstraintDescription.swift:312 internal func greaterThanOrEqualTo(other: LayoutSupport) -> ConstraintDescriptionEditable {ConstraintDescription.swift:564 private func constrainTo(other: LayoutSupport, relation: ConstraintRelation) -> ConstraintDescription {ConstraintItem.swift:49 return self.object as? LayoutSupportConstraintItem.swift:48 internal var layoutSupport: LayoutSupport? {{ 0038 0039 /// The interface layout direction 0040 public static var interfaceLayoutDirection
Constraint.swift:456 case .Leading: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.left : -insets.rightConstraint.swift:457 case .Trailing: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.right : -insets.left= InterfaceLayoutDirection.LeftToRight 0041 0042 }
Constraint.swift:456 case .Leading: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.left : -insets.rightConstraint.swift:457 case .Trailing: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.right : -insets.left