Skip to content

Commit

Permalink
⭐️ Impl: RNIModalPresentation Protocol
Browse files Browse the repository at this point in the history
Related:
* TODO:2023-03-04-06-34-28 - Library Native Cleanup
* TODO:2023-03-04-15-39-46 - Impl. `RNIModalManager`
  • Loading branch information
dominicstop committed Mar 21, 2023
1 parent d35216c commit dcc4e01
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion ios/src_library/React Native/RNIModal/RNIModal.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ public typealias RNIModal =
& RNIModalState
& RNIModalRequestable
& RNIModalFocusNotifiable
& RNIModalFocusNotifying;
& RNIModalFocusNotifying
& RNIModalPresentation;


/// Contains modal-related properties that are used to uniquely identify a modal
Expand Down Expand Up @@ -105,3 +106,16 @@ public protocol RNIModalFocusNotifying: AnyObject {
var modalFocusDelegate: RNIModalFocusNotifiable? { get set };

};

/// Properties related to modal presentation.
///
/// Specifies that the "adoptee/delegate" that conforms to this protocol must
/// implement this so that the "delegator" understands how the delegate presents
/// the modal.
///
public protocol RNIModalPresentation: AnyObject {

/// Returns the modal view controller that is to be presented
var modalViewController: UIViewController? { get };

};

0 comments on commit dcc4e01

Please sign in to comment.