# CSSectionBy Class Reference

# CSSectionBy

    @available(OSX 10.12, *)
    @objc
    public final class CSSectionBy : NSObject

The `CSSectionBy` serves as the Objective-C bridging type for `SectionBy`.

See also

`SectionBy`

- `keyPath(_:)`

  Initializes a `CSSectionBy` clause with the key path to use to group `CSListMonitor` objects into sections

  #### Declaration

  Swift

      @objc
      public static func keyPath(_ sectionKeyPath: KeyPathString) -> CSSectionBy

  #### Parameters

  `sectionKeyPath` | the key path to use to group the objects into sections

  #### Return Value

  a `CSSectionBy` clause with the key path to use to group `CSListMonitor` objects into sections

- `keyPath(_:sectionIndexTransformer:)`

  Initializes a `CSSectionBy` clause with the key path to use to group `CSListMonitor` objects into sections, and a closure to transform the value for the key path to an appropriate section name

  #### Declaration

  Swift

      @objc
      public static func keyPath(_ sectionKeyPath: KeyPathString, sectionIndexTransformer: @escaping (_ sectionName: String?) -> String?) -> CSSectionBy

  #### Parameters

  `sectionKeyPath` | the key path to use to group the objects into sections
  `sectionIndexTransformer` | a closure to transform the value for the key path to an appropriate section name

  #### Return Value

  a `CSSectionBy` clause with the key path to use to group `CSListMonitor` objects into sections