Functions

The following functions are available globally.

  • Constraints are said to be equal if both first and second items are NSObjects that are equal, and that the attributes, mulipliers, constants and priorities are equal

    Declaration

    Swift

    public func ==(c1:NSLayoutConstraint, c2:NSLayoutConstraint) -> Bool
  • Declaration

    Swift

    public func !=(c1:NSLayoutConstraint, c2:NSLayoutConstraint) -> Bool

    Return Value

    the negative of == for NSLayoutConstraints.

  • Uses == on the constraints in the two arrays. This allows isEqual(_:) to remain unchanged for NSLayoutConstraint but allows two constraint arrays to be compared.

    Declaration

    Swift

    public func ==(c1:[NSLayoutConstraint], c2:[NSLayoutConstraint]) -> Bool
  • Uses == on the constraints in the two arrays. This allows isEqual(_:) to remain the unchanged for NSLayoutConstraint but allows two arrays to be compared.

    Declaration

    Swift

    public func !=(c1:[NSLayoutConstraint], c2:[NSLayoutConstraint]) -> Bool
  • Convenience function for comparing two NSDate objects.

    Note

    compareDate(_:toDate:toUnitGranularity:) should be used for more complex comparing.

    Declaration

    Swift

    public func >(d1:NSDate, d2:NSDate) -> Bool

    Return Value

    true if d1.compare(d2) returns .OrderedDescending.

  • Convenience function for comparing two NSDate objects.

    Note

    compareDate(_:toDate:toUnitGranularity:) should be used for more complex comparing.

    Declaration

    Swift

    public func <(d1:NSDate, d2:NSDate) -> Bool

    Return Value

    true if d1.compare(d2) returns .OrderedAscending.

  • Convenience function for comparing two NSDate objects.

    Note

    compareDate(_:toDate:toUnitGranularity:) should be used for more complex comparing.

    Declaration

    Swift

    public func >=(d1:NSDate, d2:NSDate) -> Bool

    Return Value

    true if d1.compare(d2) is not .OrderedAscending.

  • Convenience function for comparing two NSDate objects.

    Note

    compareDate(_:toDate:toUnitGranularity:) should be used for more complex comparing.

    Declaration

    Swift

    public func <=(d1:NSDate, d2:NSDate) -> Bool

    Return Value

    true if d1.compare(d2) is not .OrderedDescending.

  • Convenience function for comparing two NSDate objects. isEqual(_:) on NSDate is overriden to use this method.

    Note

    compareDate(_:toDate:toUnitGranularity:) should be used for more complex comparing.

    Declaration

    Swift

    public func ==(d1:NSDate, d2:NSDate) -> Bool

    Return Value

    true if d1.compare(d2) is .OrderedSame.

  • Convenience creator for even UIEdgeInsets.

    Declaration

    Swift

    public func UIEdgeInsetsMakeEqual(inset:CGFloat) -> UIEdgeInsets

    Parameters

    inset

    The amount for each side of the inset.

    Return Value

    A UIEdgeInsets with top, left, bottom and right all set to inset.

  • Convenience function to create a new dictionary with the results of assignNewValuesFrom(_:) for two dictionaries of the same type.

    See more

    Declaration

    Swift

    public func +<Key,Value>(d1:Dictionary<Key,Value>, d2:Dictionary<Key,Value>) -> Dictionary<Key,Value>

    Parameters

    d1

    A dictionary which forms the basis for assignment.

    d2

    A dictionary which provides the new values for assignment.

    Return Value

    A new dictionary based with the entries from d2 being set on d1.