Skip to content

fix: Remove unexpected large top spacing in modal presentation (#33)#35

Open
addnad wants to merge 1 commit intocirclefin:masterfrom
addnad:fix/modal-top-spacing
Open

fix: Remove unexpected large top spacing in modal presentation (#33)#35
addnad wants to merge 1 commit intocirclefin:masterfrom
addnad:fix/modal-top-spacing

Conversation

@addnad
Copy link
Copy Markdown

@addnad addnad commented Apr 7, 2026

On iOS, even with modalPresentationStyle = .overFullScreen, the presented view controller's content was respecting safe area insets, causing a large blank area above the modal content (particularly visible with notches/status bars).

The fix:

  • Set the view controller's frame to UIScreen.main.bounds to ensure full screen coverage
  • Use additionalSafeAreaInsets with negative top value to offset the safe area, allowing the modal content to extend behind the status bar
  • Added iOS 11.0+ availability check for the additionalSafeAreaInsets property

This applies to both RnWalletSdk.swift and ProgrammablewalletRnSdkModule.swift to cover both Bare React Native and Expo use cases.

Fixes: #33

…efin#33)

On iOS, even with modalPresentationStyle = .overFullScreen, the presented view
controller's content was respecting safe area insets, causing a large blank area
above the modal content (particularly visible with notches/status bars).

The fix:
- Set the view controller's frame to UIScreen.main.bounds to ensure full screen coverage
- Use additionalSafeAreaInsets with negative top value to offset the safe area,
  allowing the modal content to extend behind the status bar
- Added iOS 11.0+ availability check for the additionalSafeAreaInsets property

This applies to both RnWalletSdk.swift and ProgrammablewalletRnSdkModule.swift
to cover both Bare React Native and Expo use cases.

Fixes: circlefin#33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modal has unexpected large top spacing

1 participant