diff --git a/experiments/swift-programmatic-modal/Test/AdaptiveModalConfigTestPresets.swift b/experiments/swift-programmatic-modal/Test/AdaptiveModalConfigTestPresets.swift index 9867d2f3..b986322e 100644 --- a/experiments/swift-programmatic-modal/Test/AdaptiveModalConfigTestPresets.swift +++ b/experiments/swift-programmatic-modal/Test/AdaptiveModalConfigTestPresets.swift @@ -738,6 +738,7 @@ enum AdaptiveModalConfigTestPresets: CaseIterable { backgroundVisualEffectIntensity: 0.04 ) ), + // snap point - 2 AdaptiveModalSnapPointConfig( snapPoint: RNILayout( @@ -809,7 +810,7 @@ enum AdaptiveModalConfigTestPresets: CaseIterable { horizontalAlignment: .center, verticalAlignment: .bottom, width: .percent(percentValue: 0.85), - height: .percent(percentValue: 0.4), + height: .percent(percentValue: 0.5), marginBottom: .init( mode: .safeAreaInsets(insetKey: \.bottom), minValue: .constant(15) diff --git a/experiments/swift-programmatic-modal/Test/AdaptiveModalPresentationTestViewController.swift b/experiments/swift-programmatic-modal/Test/AdaptiveModalPresentationTestViewController.swift index 9f17fc41..593b98b0 100644 --- a/experiments/swift-programmatic-modal/Test/AdaptiveModalPresentationTestViewController.swift +++ b/experiments/swift-programmatic-modal/Test/AdaptiveModalPresentationTestViewController.swift @@ -11,8 +11,8 @@ fileprivate class TestModalViewController: UIViewController, AdaptiveModalEventN weak var modalManager: AdaptiveModalManager?; - var showDismissButton = false; - var showCustomSnapPointButton = true; + var showDismissButton = true; + var showCustomSnapPointButton = false; lazy var floatingViewLabel: UILabel = { let label = UILabel(); @@ -109,6 +109,17 @@ fileprivate class TestModalViewController: UIViewController, AdaptiveModalEventN .safeAreaInsets(insetKey: \.bottom), .constant(15), ]) + ), + animationKeyframe: .init( + modalCornerRadius: 15, + modalMaskedCorners: [ + .layerMaxXMaxYCorner, + .layerMaxXMinYCorner, + .layerMinXMaxYCorner, + .layerMinXMinYCorner, + ], + modalBackgroundOpacity: 0.9, + backgroundOpacity: 0 ) ); @@ -284,6 +295,13 @@ class AdaptiveModalPresentationTestViewController : UIViewController { @objc func onPressButtonPresentViewController(_ sender: UIButton) { let testVC = TestModalViewController(); + switch self.currentModalConfigPreset { + case .demo08, .demo07: + testVC.showCustomSnapPointButton = true; + + default: break; + }; + self.adaptiveModalManager.eventDelegate = testVC; testVC.modalManager = self.adaptiveModalManager;