<!--
{
  "availability" : [
    "iOS: 14.5.0 -",
    "iPadOS: 14.5.0 -",
    "macCatalyst: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIListSeparatorConfiguration-swift.struct",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:5UIKit28UIListSeparatorConfigurationV"
  },
  "title" : "UIListSeparatorConfiguration"
}
-->

# UIListSeparatorConfiguration

A configuration that controls the list separator appearance in a list section.

```
struct UIListSeparatorConfiguration
```

## Overview

To specify list separator appearance for a section, set a default sectionwide [`separatorConfiguration`](/documentation/UIKit/UICollectionLayoutListConfiguration-swift.struct/separatorConfiguration) on your [`UICollectionLayoutListConfiguration`](/documentation/UIKit/UICollectionLayoutListConfiguration-swift.struct) when you create your list.

```swift
var listConfig = UICollectionLayoutListConfiguration(appearance: .plain)
listConfig.separatorConfiguration.color = .tertiarySystemFill
let layout = UICollectionViewCompositionalLayout.list(using: listConfig)
```

To override list separator appearance on a per-item basis, use the [`itemSeparatorHandler`](/documentation/UIKit/UICollectionLayoutListConfiguration-swift.struct/itemSeparatorHandler-swift.property) property.

```swift
var listConfig = UICollectionLayoutListConfiguration(appearance: .plain)
listConfig.separatorConfiguration.color = .tertiarySystemFill

let indexPathToHide = IndexPath()
 
listConfig.itemSeparatorHandler = { (indexPath, sectionSeparatorConfiguration) in    
    var configuration = sectionSeparatorConfiguration
    if indexPath == indexPathToHide {
        configuration.bottomSeparatorVisibility = .hidden    
    }    
    return configuration
}

let layout = UICollectionViewCompositionalLayout.list(using: listConfig)
```

## Topics

### Creating a list separator configuration

[`init(listAppearance:)`](/documentation/UIKit/UIListSeparatorConfiguration-swift.struct/init(listAppearance:))

Creates a list separator configuration with default values according to the specified list appearance.

### Controlling separator visibility

[`topSeparatorVisibility`](/documentation/UIKit/UIListSeparatorConfiguration-swift.struct/topSeparatorVisibility)

The visibility of the top separator for the item the configuration applies to.

[`bottomSeparatorVisibility`](/documentation/UIKit/UIListSeparatorConfiguration-swift.struct/bottomSeparatorVisibility)

The visibility of the bottom separator for the item the configuration applies to.

[`Visibility`](/documentation/UIKit/UIListSeparatorConfiguration-swift.struct/Visibility)

Constants that define the visibility of list separators.

### Configuring separator insets

[`topSeparatorInsets`](/documentation/UIKit/UIListSeparatorConfiguration-swift.struct/topSeparatorInsets)

Insets to apply to the top separator of the item the configuration applies to.

[`bottomSeparatorInsets`](/documentation/UIKit/UIListSeparatorConfiguration-swift.struct/bottomSeparatorInsets)

Insets to apply to the bottom separator of the item the configuration applies to.

[`automaticInsets`](/documentation/UIKit/UIListSeparatorConfiguration-swift.struct/automaticInsets)

A constant that specifies a placeholder size for separator insets.

### Configuring separator appearance

[`color`](/documentation/UIKit/UIListSeparatorConfiguration-swift.struct/color)

The color to use for the separators of the item the configuration applies to.

[`multipleSelectionColor`](/documentation/UIKit/UIListSeparatorConfiguration-swift.struct/multipleSelectionColor)

The color to use for the separators of the item the configuration applies to when the item is in a multiple-selection group.

[`visualEffect`](/documentation/UIKit/UIListSeparatorConfiguration-swift.struct/visualEffect)

The visual effect to use for the separators of the item the configuration applies to.

## Relationships

### Conforms To

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Copyable`](/documentation/Swift/Copyable)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CustomReflectable`](/documentation/Swift/CustomReflectable)

[`Escapable`](/documentation/Swift/Escapable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)