FunkySortComparable

@protocol FunkySortComparable <NSObject>

This is a protocol for comparing objects

  • This method compares the content of two objects (the current and the one given in the parameter)

    Declaration

    Objective-C

    - (NSComparisonResult)compare:(id)object;

    Swift

    func compare(_ object: Any!) -> ComparisonResult

    Parameters

    object

    The other object to compare with

    Return Value

    An NSComparisonResult (Ascending/Descending/Same) after comparing the two objects