-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from daangn/impl-should-scroll-to-top-modifier
NO-JIRA `scrollViewShouldScrollToTop`event modifier 추가해요.
- Loading branch information
Showing
4 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
Sources/KarrotListKit/Event/List/ShouldScrollToTopEvent.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// Copyright (c) 2025 Danggeun Market Inc. | ||
// | ||
|
||
import UIKit | ||
|
||
/// This structure encapsulates the shouldScrollToTop event information and contains a closure object for shouldScrollToTop event. | ||
public struct ShouldScrollToTopEvent: ListingViewEvent { | ||
public struct EventContext { | ||
/// The collectionView object requesting this information. | ||
public let collectionView: UICollectionView | ||
} | ||
|
||
/// A closure that's called when if the scroll view should scroll to the top of the content. | ||
let handler: (EventContext) -> Bool | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters