-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⭐️ Impl:
ModalSheetPresentationStateMachine.eventDelegates
- Loading branch information
1 parent
33c5c99
commit 2ae97ff
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
ios/Temp/ModalSheetPresentationStateEventsNotifiable.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,47 @@ | ||
// | ||
// ModalSheetPresentationStateEventsNotifiable.swift | ||
// react-native-ios-modal | ||
// | ||
// Created by Dominic Go on 9/27/24. | ||
// | ||
|
||
import Foundation | ||
|
||
public protocol ModalSheetPresentationStateEventsNotifiable: AnyObject { | ||
|
||
func onModalSheetStateWillChange( | ||
sender: ModalSheetPresentationStateMachine, | ||
prevState: ModalSheetState?, | ||
currentState: ModalSheetState, | ||
nextState: ModalSheetState | ||
); | ||
|
||
func onModalSheetStateDidChange( | ||
sender: ModalSheetPresentationStateMachine, | ||
prevState: ModalSheetState?, | ||
currentState: ModalSheetState | ||
); | ||
}; | ||
|
||
// MARK: - ModalSheetPresentationStateEventsNotifiable+Default | ||
// ----------------------------------------------------------- | ||
|
||
public extension ModalSheetPresentationStateEventsNotifiable { | ||
|
||
func onModalSheetStateWillChange( | ||
sender: ModalSheetPresentationStateMachine, | ||
prevState: ModalSheetState?, | ||
currentState: ModalSheetState, | ||
nextState: ModalSheetState | ||
) { | ||
// no-op | ||
}; | ||
|
||
func onModalSheetStateDidChange( | ||
sender: ModalSheetPresentationStateMachine, | ||
prevState: ModalSheetState?, | ||
currentState: ModalSheetState | ||
) { | ||
// no-op | ||
}; | ||
}; |
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