From 38ed7ccd5793d0cb78eeca7efd4e10bd2887184b Mon Sep 17 00:00:00 2001 From: iletai Date: Sat, 4 May 2024 13:14:04 +0700 Subject: [PATCH] * Fix lint --- Sources/CalendarView/CalendarView.swift | 29 +++++++++++++++++++------ 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/Sources/CalendarView/CalendarView.swift b/Sources/CalendarView/CalendarView.swift index 6e2784b..6f661f8 100644 --- a/Sources/CalendarView/CalendarView.swift +++ b/Sources/CalendarView/CalendarView.swift @@ -19,23 +19,38 @@ import SwiftUI - HeaderView: The type of view to use for displaying the header containing the month and year. - DateOutView: The type of view to use for displaying dates outside the current month. - - Note: The `CalendarView` struct is a generic type that takes three type parameters: `DateView`, `HeaderView`, and `DateOutView`. These type parameters determine the types of views used for displaying dates, headers, and dates outside the current month, respectively. + - Note: The `CalendarView` struct is a generic type that takes three type parameters: `DateView`, `HeaderView`, + and `DateOutView`. + - These type parameters determine the types of views used for displaying dates, + headers, and dates outside the current month, respectively. - Note: The `CalendarView` struct conforms to the `View` protocol, which means it can be used as a view in SwiftUI. - - Note: The `CalendarView` struct is annotated with the `@MainActor` attribute, which ensures that the view is always accessed from the main actor's context. + - Note: The `CalendarView` struct is annotated with the `@MainActor` attribute, + which ensures that the view is always accessed from the main actor's context. - - Note: The `CalendarView` struct has several associated type aliases: `OnSelectedDate`, `OnEndDragAction`, `YearData`, `MonthDateData`, and `WeekDataData`. These aliases are used to define the types of closures and data structures used by the `CalendarView`. + - Note: The `CalendarView` struct has several associated type aliases: `OnSelectedDate`, + `OnEndDragAction`, `YearData`, `MonthDateData`, and `WeekDataData` + . These aliases are used to define the types of closures and data structures used by the `CalendarView`. - - Note: The `CalendarView` struct has several properties, including `date`, `calendarOptions`, `dateView`, `headerView`, `dateOutView`, `pinedHeaderView`, `onSelected`, `isGestureFinished`, and `onDraggingEnded`. These properties control the behavior and appearance of the calendar view. + - Note: The `CalendarView` struct has several properties, including + `date`, `calendarOptions`, `dateView`, `headerView`, `dateOutView`, `pinedHeaderView`, `onSelected`, + `isGestureFinished`, and `onDraggingEnded`. + These properties control the behavior and appearance of the calendar view. - Note: The `CalendarView` struct has a `body` property that returns a `View` representing the content of the calendar view. - - Note: The `CalendarView` struct uses a `ScrollView` and a `LazyVGrid` to display the calendar's content. The `ScrollView` provides scrolling behavior, while the `LazyVGrid` arranges the date views in a grid layout. + - Note: The `CalendarView` struct uses a `ScrollView` and a `LazyVGrid` to display the calendar's content. + The `ScrollView` provides scrolling behavior, while the `LazyVGrid` arranges the date views in a grid layout. - - Note: The `CalendarView` struct uses a `DragGesture` to detect swipe gestures on the calendar view. When a swipe gesture is detected, the `onDraggingEnded` closure is called with the direction of the swipe and the current view mode of the calendar. + - Note: The `CalendarView` struct uses a `DragGesture` to detect swipe gestures on the calendar view. + When a swipe gesture is detected, + the `onDraggingEnded` closure is called with the direction of the swipe and the current view mode of the calendar. - - Note: The `CalendarView` struct provides several modifiers, such as `marginDefault()`, `background(_:)`, `simultaneousGesture(_:)`, `scrollIndicators(_:)`, `scrollDisabled(_:)`, and `frameInfinity()`, that can be used to customize the appearance and behavior of the calendar view. + - Note: The `CalendarView` struct provides several modifiers, + such as `marginDefault()`, `background(_:)`, `simultaneousGesture(_:)`, + `scrollIndicators(_:)`, `scrollDisabled(_:)`, and `frameInfinity()`, + that can be used to customize the appearance and behavior of the calendar view. */ @MainActor public struct CalendarView<