Slather logo

Coverage for "ChatLayoutSettings.swift" : 100.00%

(1 of 1 relevant lines covered)

ChatLayout/Classes/Core/ChatLayoutSettings.swift

1
//
2
// ChatLayout
3
// ChatLayoutSettings.swift
4
// https://github.com/ekazaev/ChatLayout
5
//
6
// Created by Eugene Kazaev in 2020-2022.
7
// Distributed under the MIT license.
8
//
9
// Become a sponsor:
10
// https://github.com/sponsors/ekazaev
11
//
12
13
import Foundation
14
import UIKit
15
16
/// `CollectionViewChatLayout` settings.
17
public struct ChatLayoutSettings: Equatable {
18
19
    /// Estimated item size for `CollectionViewChatLayout`. This value will be used as the initial size of the item and the final size
20
    /// will be calculated using `UICollectionViewCell.preferredLayoutAttributesFitting(...)`.
21
    public var estimatedItemSize: CGSize?
22
23
    /// Spacing between the items in the section.
24
    public var interItemSpacing: CGFloat = 0
25
26
    /// Spacing between the sections.
27
    public var interSectionSpacing: CGFloat = 0
28
29
    /// Additional insets for the `CollectionViewChatLayout` content.
30
    public var additionalInsets: UIEdgeInsets = .zero
24x
31
32
}