title: Changing bounds of a SwiftUI View when inserting UIKit functionality
body: <p>I am currently trying to insert UIKit functionality into SwiftUI as the API I am using has a tutorial with UIKit and my project is SwiftUI.  For context, this is the exact post I used to implement this functionality: <a href="https://stackoverflow.com/questions/69757135/inserting-uikit-content-into-a-swiftui-view-hierarchy">Inserting UIKit content into a SwiftUI view hierarchy</a></p>
  <p>As a result, I have 2 different files: PBViewController and PassbaseView.  The preview of PassbaseView looks like so: <a href="https://i.stack.imgur.com/pdTAC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pdTAC.png" alt="preview" /></a></p>
  <p>As a result, calling PassBaseView() in the SwiftUI View where I desire to have the button doesn't result in what I want, as the whitespace around the button is included, when I just want the button.  How do I only get the button to be inserted when I call PassBaseView()? My code is exactly the same as the post I linked.</p>
  <p>My initial idea was to do this in the PBViewController file:</p>
  <pre><code>self.view.frame.size.width = 300
  self.view.frame.size.height = 60
  </code></pre>
  <p>but this did not work.</p>