File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
packages/react-native-bottom-tabs/ios/TabView Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -102,11 +102,19 @@ struct BottomAccessoryRepresentableView: PlatformViewRepresentable {
102102 var view : PlatformView
103103
104104 func makeUIView( context: Context ) -> PlatformView {
105+ let wrapper = UIView ( )
106+ wrapper. addSubview ( view)
107+
108+ view. autoresizingMask = [ . flexibleWidth, . flexibleHeight]
109+
105110 emitPlacementChanged ( for: view)
106- return view
111+ return wrapper
107112 }
108113
109114 func updateUIView( _ uiView: PlatformView , context: Context ) {
115+ if let subview = uiView. subviews. first {
116+ subview. frame = uiView. bounds
117+ }
110118 emitPlacementChanged ( for: view)
111119 }
112120
@@ -117,7 +125,7 @@ struct BottomAccessoryRepresentableView: PlatformViewRepresentable {
117125 var placementValue = " none "
118126 if tabViewBottomAccessoryPlacement == . inline {
119127 placementValue = " inline "
120- } else if tabViewBottomAccessoryPlacement == . expanded {
128+ } else if ( tabViewBottomAccessoryPlacement == . expanded) {
121129 placementValue = " expanded "
122130 }
123131 uiView. perform ( selector, with: placementValue)
You can’t perform that action at this time.
0 commit comments