Functions
The following functions are available globally.
-
Constraints are said to be equal if both first and second items are
NSObject
s that are equal, and that the attributes, mulipliers, constants and priorities are equalDeclaration
Swift
public func ==(c1:NSLayoutConstraint, c2:NSLayoutConstraint) -> Bool
-
Declaration
Swift
public func !=(c1:NSLayoutConstraint, c2:NSLayoutConstraint) -> Bool
Return Value
the negative of
==
forNSLayoutConstraint
s. -
Uses
==
on the constraints in the two arrays. This allowsisEqual(_:)
to remain unchanged forNSLayoutConstraint
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 allowsisEqual(_:)
to remain the unchanged forNSLayoutConstraint
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
ifd1.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
ifd1.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
ifd1.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
ifd1.compare(d2)
is not.OrderedDescending
. -
Convenience function for comparing two
NSDate
objects.isEqual(_:)
onNSDate
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
ifd1.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
withtop
,left
,bottom
andright
all set toinset
.
-
Convenience function to create a new dictionary with the results of
See moreassignNewValuesFrom(_:)
for two dictionaries of the same type.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 ond1
.