title: How to calculate Tab Bar height in SwiftUI?
body: <p>I have a page with a player that has a height of 1/3 of the screen height. Under the channels, there are multiple channels inside a scroll view. I am trying to set the height of the scroll view section exactly from bottom of the player to bottom of the page. I tried to set it to (screen height - (playerheight) - (navigation bar height) - (tabbed bar height)). But the problem is that the tabbed bar height changes from device to device. I tried the following code: </p>
  
  <pre><code>.frame(height: (UIScreen.main.bounds.height) - ((UIScreen.main.bounds.height) * 2/6) - (geometry.safeAreaInsets.top + geometry.safeAreaInsets.bottom ) )
  </code></pre>
  
  <p>But it looks like geometry.safeAreaInsets.bottom does not contain the tabbed bar height. So is there any way to calculate it in SwiftUI or is there any other way to achieve a similar appearance?</p>
  
  <p>I just want to place scrollview that contains the channels exactly between player and tab bar for all screen sizes.</p>
  
  <p><a href="https://i.stack.imgur.com/A4soq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A4soq.png" alt="sample design"></a></p>