max(ofProperty:)
public func max<T: MinMaxType>(ofProperty property: String) -> T?
Returns the maximum (highest) value of the given property among all the objects in the list, or nil
if the list
is empty.
Warning
Only a property whose type conforms to the MinMaxType
protocol can be specified.
-
Declaration
Swift
public func max<T: MinMaxType>(ofProperty property: String) -> T?