Swiftui UIViewRepresentable table view having padding while scrolling - swiftui

Why having padding while scrolling the table view although added Hosting cell to hold the view and create the view once time only. Any idea regarding my mistake?
enter image description here

Related

Navigation View in Tab View Child Views SwiftUi

I have started learning swiftUI so I have question about Navigation View. My app starts with splash screen which is embedded in Navigation View and after that I have navigation link to the second screen which is Tab View. Do I need navigation views in child views of Tab View if I have some button etc and I also need to go to other screens from them or I use primary navigation view which tab view is embedded in?
When using both TabView and NavigationView, TabView should always be the parent view and should contain NavigationView inside it.
Hope this clarifies what you’re looking for?

How to make a side popup view in swiftui

What is the name of the SwiftUI View shown in the image (the side popup view on the top right of the screen)? If it's custom made, then what default SwiftUI view do I use to achieve this look in my own app?

Swiftui navigationview and tabview give grey header

I have a two-tabbed tab view and in the second tab there are different pages being displayed. There is a navigationview and navigationlink within some of the pages. The navigation bar has a weird grey background that I can’t make go away. Any ideas how to remove that?
So it turns out I had a .padding around the view for the second tab, so everything within that view was padded, which introduced this. Removing that solved the issue.

UIViewRepresentable not sizing correctly in ScrollView

I followed Apple's guide on using UIPageViewController with SwiftUI. Their guide works fine. However I ran into an issue, where if I have my PageView inside a ScrollView - the height of the PageView is no longer respected and I have to set the frame manually. Not ideal, as the content inside PageView is dynamic and thus, heights will vary.
This seems to be an issue with ScrollView; as I have another view - UIViewRepresentable - that is a simple wrapper around WKWebView - with the same issue.
Is there a way to have these views size themselves, inside a SwiftUI ScrollView?
If I place these views outside of a ScrollView and into a simple VStack for example, they size themselves correctly.

How to adjust UIView height according to the Collection View Content Height in swift 3?

I have a problem of adjusting the UIView height in my project. I illustrated the project.
Let me explain about my project image.Each Orange UIView has trailing, leading , top and bottom constraints and vertical spacing to each UIView. But, I add "Height" to each UIView because if I don't add, it gives error and add the "Height" warning.
In UIView2, I add 3 Container Views. Each Container Views has 3 View Controllers. (Data 1 View, Data 2 View, Data 3 View)
I embed Collection View inside in each views.
The problem is that in Data 3 View has many collection View cell data. So, the height of Orange UIView should be increase according to the collection view content.
Currently, I just add fixed height constant (height:800) if users click on the Data 3 segmented control button. But, I don't want to set fixed height like this.
I've been trying to solve this problem since last week. I could not solve this till now.
Can anyone help me explain in step by step please? Because I have no idea of what should I do.
Since UITableView or UICollectionView inherit from UIScrollView they basically do not have an intrinsicContentSize.
You have two ways to make the same height as the content size (the space that you can scroll):
You can subclass the collection view and override intrinsicContentSize method to return the contentSize and the sizeThatFits: method as well
Create a height constraint in the interface and set it as equal to the content size of the collection view.