Created
April 22, 2025 17:36
-
-
Save iregina/32617677538825145a14a6ba53735ff3 to your computer and use it in GitHub Desktop.
Simple example of TransportableView on iOS - Shopify MobileBridge
This file contains hidden or 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
final class TransportableView: RCTView { | |
func transportTo(_ transportView: TransportableView) { | |
if let transportedView = subviews.first { | |
transportedView.removeFromSuperview() | |
transportView.insertSubview(transportedView, at: 0) | |
bridge.uiManager?.setSize(frame.size, for: transportedView) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment