Comments (4)
Thanks, I'll have a look
from compose-multiplatform.
Can you try to rewrite this code using the anchor constraints instead of autoresize mask? It seems to me that the size could be calculated incorrectly in this code.
from compose-multiplatform.
I tried this code and the result is the same:
let rootView = ComposeView()
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(Color.white)
let controller = UIHostingController(rootView: rootView)
self.addChild(controller)
controller.view.translatesAutoresizingMaskIntoConstraints = false
self.view.addSubview(controller.view)
controller.view.leadingAnchor.constraint(equalTo: self.view.leadingAnchor).isActive = true
controller.view.trailingAnchor.constraint(equalTo: self.view.trailingAnchor).isActive = true
controller.view.topAnchor.constraint(equalTo: self.view.topAnchor).isActive = true
controller.view.bottomAnchor.constraint(equalTo: self.view.bottomAnchor).isActive = true
controller.didMove(toParent: self)
from compose-multiplatform.
Keep in mind that I tried the same code to render a Swift View and the contents of the Swift View were displayed correctly.
from compose-multiplatform.
Related Issues (20)
- When I run it on MacOS, I use the Chinese input method to stay on the candidate word interface, and then click another TextField with the mouse, the APP crashes directly. HOT 2
- Memory usage increases exponentially with each opening of `ModalBottomSheet` on `iOS` HOT 3
- org.jetbrains.skiko.SystemThemeHelper.getCurrentSystemTheme() crash HOT 1
- Focus is not displayed when requesting focus programmatically upon a mouse action HOT 2
- Canvas Limitations on the Web HOT 3
- Compose multiplatform 1.6.10-dev1584 results in an error with Cococapods HOT 10
- Navigation Compose Multiplatform `2.8.0-alpha01` - Exception when navigate with arguments HOT 3
- iOS accessibility elements locate incorrectly in SwiftUI when position.x is not zero. HOT 1
- [Wasm] Variable fonts are displayed as ����� HOT 4
- Web (wasm) Browser Zoom not working as expected HOT 1
- [Wasm] isSystemInDarkTheme does not return a correct value HOT 1
- [Wasm] `composeResources` are not bundled with the wasm application HOT 1
- [Wasm] Document.visibilityState is not available on Wasm but is on JS HOT 1
- Generic shape borders are stroked with miter ends HOT 3
- Could not find "org.jetbrains.compose.collection-internal:collection" HOT 7
- Swing/JavaFx interop, container has not been initialized when added later
- Exporting resources via xcframework or maven in multiplatform library HOT 1
- Compose plugin causes crash on app startup HOT 1
- Consider support more targets for the KMP Lifecycle HOT 4
- Execution failed for task ':androidApp:processDebugResources' with LinkApplicationAndroidResourcesTask HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compose-multiplatform.