Scrolling issue while add SwiftDataTable to the particular UIView
adwani0007 opened this issue · 9 comments
I am getting Scrolling issue when I have addSubview to custom UIView instead of self.view.
It will cut last two or three rows while scrolling.
Hey, could you explain your problem a bit more? It's not clear to me what could be causing this.
How are you adding the subview? Are you setting the constraints correctly? I'm guessing what the issue is. :P
This is to do with the way you're adding your views and nothing to do with the scrolling behaviour.
The scrolling behaviour works correctly but if you're not managing your view hierarchy correctly, you can potentially chop views off :P
Let me know if there's an actual issue with the API that you're finding, i'll keep this closed for now.
I have attached on image for the constraint of the UIView(gray type color) in which I have added the datatable and one zip file that contains video showing the issue.
You can in the video that the last 2 rows are not showing properly while scrolling.
Thank you in advance!.
This is because of your navigation bar. You're not setting your constraints properly. The same thing will happen if you add a normal tableview. Try it.
And to further prove this point, if you hide the navigation bar you'll notice the content will appear again. The offset is exactly the same size as the height of the navigation bar
Could you recreate this issue in a blank application and upload it for me. This means recreating the problem with the fewest lines of code so I can debug this if it turns out it's an issue easy to replicate.
I have tried out the solution (Hide navigation bar), but the issue remains same.
I have recreate this issue in blank application you can check it out.
Here is the link: http://siyasoft.com/demo/DataTableDemo.zip
Thank You.
As mentioned before, you're not setting up your frames correctly, this is not an issue with the API.
Change the way you setup your view in your project:
self.dataTable.frame = self.view.frame
to this:
self.dataTable.frame = self.tblView.bounds
Yeah, it's worked..Thank you for your help.