File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
packages/swift-ui/platforms/ios/src Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -13,13 +13,14 @@ extension SwiftUIProvider {
13
13
let childVC = buildViewController ( content: content)
14
14
childVC. view. backgroundColor = . clear
15
15
addChild ( childVC)
16
- childVC. view. translatesAutoresizingMaskIntoConstraints = false
17
- childVC. view. frame = view. frame
16
+ // childVC.view.translatesAutoresizingMaskIntoConstraints = false
17
+ childVC. view. frame = view. bounds
18
+ childVC. view. autoresizingMask = [ . flexibleWidth, . flexibleHeight]
18
19
view. addSubview ( childVC. view)
19
- childVC. view. topAnchor. constraint ( equalTo: view. safeAreaLayoutGuide. topAnchor) . isActive = true
20
- childVC. view. bottomAnchor. constraint ( equalTo: view. safeAreaLayoutGuide. bottomAnchor) . isActive = true
21
- childVC. view. widthAnchor. constraint ( equalToConstant: 128 ) . isActive = true
22
- childVC. view. centerXAnchor. constraint ( equalTo: view. safeAreaLayoutGuide. centerXAnchor) . isActive = true
20
+ // childVC.view.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true
21
+ // childVC.view.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor).isActive = true
22
+ // childVC.view.widthAnchor.constraint(equalToConstant: 128).isActive = true
23
+ // childVC.view.centerXAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerXAnchor).isActive = true
23
24
childVC. didMove ( toParent: self )
24
25
}
25
26
You can’t perform that action at this time.
0 commit comments