Skip to content

Commit 503a36f

Browse files
Mark Pospeselmpospese
Mark Pospesel
authored andcommitted
[Issue-1] Consistently end documentation comments with period (.)
1 parent 67f78ae commit 503a36f

13 files changed

+40
-34
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,26 +98,30 @@ public struct Appearance {
9898
public let elevation: Elevation?
9999
/// Dimmer view color. Default is 'UIColor.black.withAlphaComponent(0.5)'.
100100
public let dimmerColor: UIColor?
101-
/// Animation duration on bottom sheet. Default is `0.3`
101+
/// Animation duration on bottom sheet. Default is `0.3`.
102102
public let animationDuration: TimeInterval
103-
/// Animation type during presenting. Default is `curveEaseIn`
103+
/// Animation type during presenting. Default is `curveEaseIn`.
104104
public let presentAnimationCurve: UIView.AnimationOptions
105-
/// Animation type during dismissing. Default is `curveEaseOut`
105+
/// Animation type during dismissing. Default is `curveEaseOut`.
106106
public let dismissAnimationCurve: UIView.AnimationOptions
107+
/// (Optional) Minimum content view height. Default is `nil`.
108+
///
109+
/// Only applicable for resizable sheets. `nil` means to use the content view's intrinsic height as the minimum.
110+
public var minimumContentHeight: CGFloat?
107111
}
108112
```
109113

110114
**Update or customize appearance**
111115

112116
```swift
113-
// Declare a resizable sheet
117+
// Declare a resizable sheet.
114118
let sheet = BottomSheetController(
115119
childController: yourViewController,
116120
appearance: .defaultResizable
117121
)
118122

119123
// Change corner radius, remove dimmer,
120-
// and use a shadow instead
124+
// and use a shadow instead.
121125
sheet.appearance.layout.cornerRadius = 24
122126
sheet.appearance.dimmerColor = nil
123127
sheet.appearance.elevation = Elevation(
@@ -129,7 +133,7 @@ sheet.appearance.elevation = Elevation(
129133
opacity: 0.4
130134
)
131135

132-
// Present the sheet
136+
// Present the sheet.
133137
present(sheet, animated: true)
134138
```
135139

Sources/YBottomSheet/Animation/BottomSheetAnimator.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88

99
import UIKit
1010

11-
/// Base class for bottom sheet present and dismiss animators
11+
/// Base class for bottom sheet present and dismiss animators.
1212
class BottomSheetAnimator: NSObject {
1313
/// Bottom sheet controller.
1414
let sheetViewController: BottomSheetController
1515

16-
/// Initializes a bottom sheet animator
17-
/// - Parameter sheetViewController: Inject bottom sheet controller.
16+
/// Initializes a bottom sheet animator.
17+
/// - Parameter sheetViewController: the sheet being animated.
1818
init(sheetViewController: BottomSheetController) {
1919
self.sheetViewController = sheetViewController
2020
super.init()

Sources/YBottomSheet/Animation/BottomSheetDismissAnimator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import UIKit
1010

11-
/// Class for dismiss animation.
11+
/// Performs the sheet dismiss animation.
1212
class BottomSheetDismissAnimator: BottomSheetAnimator {
1313
override func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {
1414
guard let fromViewController = transitionContext.viewController(forKey: .from),

Sources/YBottomSheet/Animation/BottomSheetPresentAnimator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import UIKit
1010

11-
/// Class for present animation.
11+
/// Performs the sheet present animation.
1212
class BottomSheetPresentAnimator: BottomSheetAnimator {
1313
override func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {
1414
guard let toViewController = transitionContext.viewController(forKey: .to) else {

Sources/YBottomSheet/BottomSheetController+Appearance.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ extension BottomSheetController {
2222
public var elevation: Elevation?
2323
/// Dimmer view color. Default is 'UIColor.black.withAlphaComponent(0.5)'.
2424
public var dimmerColor: UIColor?
25-
/// Animation duration on bottom sheet. Default is `0.3`
25+
/// Animation duration on bottom sheet. Default is `0.3`.
2626
public var animationDuration: TimeInterval
27-
/// Animation type during presenting. Default is `curveEaseIn`
27+
/// Animation type during presenting. Default is `curveEaseIn`.
2828
public var presentAnimationCurve: UIView.AnimationOptions
29-
/// Animation type during dismissing. Default is `curveEaseOut`
29+
/// Animation type during dismissing. Default is `curveEaseOut`.
3030
public var dismissAnimationCurve: UIView.AnimationOptions
31-
/// (Optional) Minimum content view height. Default is `nil`
31+
/// (Optional) Minimum content view height. Default is `nil`.
3232
///
3333
/// Only applicable for resizable sheets. `nil` means to use the content view's intrinsic height as the minimum.
3434
public var minimumContentHeight: CGFloat?

Sources/YBottomSheet/BottomSheetController.Appearance+Layout.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ extension BottomSheetController.Appearance {
1414
/// Corner radius of bottom sheet view. Default is `16`.
1515
public var cornerRadius: CGFloat
1616

17-
/// Default layout
17+
/// Default layout.
1818
public static let `default` = Layout(cornerRadius: 16)
1919

20-
/// Initializes a `Layout`.
20+
/// Initializes a sheet layout.
2121
/// - Parameters:
2222
/// - cornerRadius: corner radius of bottom sheet view.
2323
public init(cornerRadius: CGFloat) {

Sources/YBottomSheet/BottomSheetController.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ public class BottomSheetController: UIViewController {
2727
sheetView.frame.origin.y
2828
}()
2929

30-
/// Minimum downward velocity beyond which we interpret a pan gesture as a downward swipe
30+
/// Minimum downward velocity beyond which we interpret a pan gesture as a downward swipe.
3131
public var dismissThresholdVelocity: CGFloat = 1000
3232

33-
/// Priorities for various non-required constraints
33+
/// Priorities for various non-required constraints.
3434
enum Priorities {
3535
static let panGesture = UILayoutPriority(775)
3636
static let sheetContentHugging = UILayoutPriority(751)
3737
static let sheetCompressionResistanceLow = UILayoutPriority.defaultLow
3838
static let sheetCompressionResistanceHigh = UILayoutPriority(800)
3939
}
4040

41-
/// Dimmer view
41+
/// Dimmer view.
4242
let dimmerView = UIView()
4343
/// Bottom sheet view.
4444
let sheetView: UIView = {
@@ -52,14 +52,14 @@ public class BottomSheetController: UIViewController {
5252
public private(set) var indicatorView: DragIndicatorView!
5353
/// Bottom sheet header view.
5454
public private(set) var headerView: SheetHeaderView!
55-
/// Holds the sheet's child content (view or view controller)
55+
/// Holds the sheet's child content (view or view controller).
5656
let contentView: UIView = {
5757
let view = UIView()
5858
view.clipsToBounds = true
5959
return view
6060
}()
6161

62-
/// Comprises the indicator view, the header view, and the content view
62+
/// Comprises the indicator view, the header view, and the content view.
6363
private let stackView: UIStackView = {
6464
let stackView = UIStackView()
6565
stackView.axis = .vertical

Sources/YBottomSheet/DragIndicatorView/DragIndicatorView+Appearance.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extension DragIndicatorView {
2222
/// Initializes an `Appearance`.
2323
/// - Parameters:
2424
/// - color: drag indicator background color.
25-
/// - layout: `drag indicator layout properties such as drag indicator size, corner radius.
25+
/// - layout: drag indicator layout properties such as drag indicator size, corner radius.
2626
public init(
2727
color: UIColor = .tertiaryLabel,
2828
layout: Layout = .default

Sources/YBottomSheet/DragIndicatorView/DragIndicatorView.Appearance+Layout.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ extension DragIndicatorView.Appearance {
1616
/// Size for the drag indicator. Default is {60, 4}.
1717
public var size: CGSize
1818

19-
/// Default layout
19+
/// Default layout.
2020
public static var `default` = Layout(cornerRadius: 2.0, size: CGSize(width: 60, height: 4))
2121

2222
/// Initializes a `Layout`.

Sources/YBottomSheet/DragIndicatorView/DragIndicatorView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ open class DragIndicatorView: UIView {
1919
}
2020
}
2121

22-
/// :nodoc:
22+
/// Returns the size of the drag handle.
2323
public override var intrinsicContentSize: CGSize {
2424
appearance.layout.size
2525
}

Sources/YBottomSheet/SheetHeaderView/SheetHeaderView+Appearance.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ extension SheetHeaderView {
2020
/// Header view layout properties such as spacing between views. Default is `.default`.
2121
public let layout: Layout
2222

23-
/// Default appearance
23+
/// Default appearance.
2424
public static let `default` = Appearance()
2525

26-
/// Initializes an `Appearance`.
26+
/// Initializes a sheet header appearance.
2727
/// - Parameters:
2828
/// - title: tuple consisting of `textColor` and `typography` for the title label.
2929
/// - closeButtonImage: close button image or pass `nil` to hide the button.

Sources/YBottomSheet/SheetHeaderView/SheetHeaderView.Appearance+Layout.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ extension SheetHeaderView.Appearance {
1717
/// The minimum required horizontal spacing between title label and message label. Default is `8.0`.
1818
public let gap: CGFloat
1919

20-
/// Default sheet header layout
20+
/// Default sheet header layout.
2121
public static let `default` = Layout(
2222
contentInset: NSDirectionalEdgeInsets(topAndBottom: 0, leadingAndTrailing: 16),
2323
gap: 8
2424
)
2525

26-
/// Initializes a `Layout`.
26+
/// Initializes a layout.
2727
/// - Parameters:
28-
/// - contentInset: custom distance the content is inset from the `HeaderView`.
28+
/// - contentInset: distance the content is inset from the header bounds.
2929
/// - gap: horizontal spacing between icon and label.
3030
public init(
3131
contentInset: NSDirectionalEdgeInsets,

Sources/YBottomSheet/SheetHeaderView/SheetHeaderView.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ import UIKit
1010
import YCoreUI
1111
import YMatterType
1212

13-
/// Header view for a bottom sheet to show title and close button.
13+
/// Header view for a bottom sheet to show optional title and optional close button.
14+
///
15+
/// (If neither title nor close button are visible, the header will not be shown.)
1416
open class SheetHeaderView: UIView {
15-
/// Appearance for the sheet header (title text and close button)
17+
/// Appearance for the sheet header (title text and close button).
1618
public var appearance: SheetHeaderView.Appearance {
1719
didSet {
1820
updateViewAppearance()
@@ -33,8 +35,8 @@ open class SheetHeaderView: UIView {
3335

3436
/// Initializes a sheet header view.
3537
/// - Parameters:
36-
/// - title: title text
37-
/// - appearance: appearance for the sheet header
38+
/// - title: title text.
39+
/// - appearance: appearance for the sheet header.
3840
public init(title: String, appearance: Appearance = .default) {
3941
self.titleLabel.text = title
4042
self.appearance = appearance

0 commit comments

Comments
 (0)