title: SwiftUI - Resizable List height that dependent on an element count
body: <p>I have some troubles with dynamically changing List height that dependent on elements count.</p>
  
  <p>I tried this solution but it didn't work.</p>
  
  <pre><code>List {
      ForEach(searchService.searchResult, id: \.self) { item in
          Text(item)
          .font(.custom("Avenir Next Regular", size: 12))
      }
  }.frame(height: CGFloat(searchService.searchResult.count * 20))
  </code></pre>